Error while creating oracle JNDI connection in Jasper Server

0

Hi forum,

I'm trying to connect oracle database using JNDI connections. done modifications on context.xml and web.xml file and added ojdbc6.jar in tomcat lib. 

<Resource
    name="jdbc/excersdev" auth="Container" type="javax.sql.DataSource"
    maxActive="100" maxIdle="30" maxWait="10000"
    username="excersdev" password="excersdev"
    driverClassName="oracle.jdbc.OracleDriver"
    validationQuery="SELECT 1 FROM DUAL"
    testOnBorrow="true"
    url="jdbc:oracle:thin:@172.16.0.39:1524:clarity?useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true&amp;autoReconnectForPools=true"
    factory="com.jaspersoft.jasperserver.tomcat.jndi.JSBasicDataSourceFactory"/>

AND

<resource-ref>
    <description>Excers DEV database</description>
    <res-ref-name>jdbc/excersdev</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
</resource-ref>

Note : Oracle version is 11g and I'm connecting to the oracle installed on office server ( I can do simple JDBC connection in Jasper Server with out any issues).

I'm getting below error .. Did anyone faced the same issue ?

 

sadakar's picture
546
Joined: Aug 14 2012 - 3:57am
Last seen: 2 months 2 days ago

Answer found in this thread. 

http://stackoverflow.com/questions/18192521/ora-12505-tnslistener-does-n...

URL

Wrong : 

 url="jdbc:oracle:thin:@172.16.0.39:1524:clarity

Correct : 

 url="jdbc:oracle:thin:@172.16.0.39:1524/clarity

instead of : (colon) use forwardslash(/)  b/w port and sid

sadakar - 2 years 5 months ago

This is working fine but I would also like to have poolable connection set to true..

I'll use this JNDI for running Stored Procedures ... 

The below two cases for URL is not working. 

1) NOT WORKING

  url="jdbc:oracle:thin:@172.16.0.39:1524/clarity?useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true&amp;autoReconnectForPools=true&amp;defaultReadOnly=true"

2) NOT WORKING

  url="jdbc:oracle:thin:@172.16.0.39:1524/clarity?defaultReadOnly=true"

WORKING

  url="jdbc:oracle:thin:@172.16.0.39:1524/clarity"

 

So, how to get this oracle connction working with defaultReadOnly property and other properties as there in 1) & 2)

Thank you :-)

sadakar - 2 years 5 months ago

u got the solution or else any issues your facing

RamaKrishna.B - 2 years 5 months ago
show 1 more...

Issue still there with adding defaultReadOnly=false  to url parameter 

sadakar - 2 years 5 months ago

0 Answers:

No answers yet
Feedback