Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

oracle thin client error - connectivity problem from Java servlets and JSPs

user515689Oct 20 2011 — edited Oct 15 2014
Hello, forum users,

I'm having difficulty connecting to an Oracle 11g development server from my webapps in Tomcat. I am thinking this is a problem with the Oracle driver and thin client itself.

We have our PROD server on Oracle 10g, and for years I've connected to it just fine. I use the ojdbc14_g.jar set of classes for the drivers.

For either version, 10g or 11g, I can connect via TOAD or SQL Plus just fine! No problems. From Tomcat, I can connect to the Oracle DB 10g just fine. But in connecting to 11g for a query in my java web app I get the following error(s):
java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=185599744)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
	at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
	at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
For what it's worth, I'm running Tomcat 6.0.29, JDK 1.6.0_18, and the above Oracle jar file for the drivers.

Should I get the new jar with a new set of drivers for this? orai18n.jar or ojdbc6.jar ?

Would that likely solve the problem? My TNSNAMES.ORA file is configured correctly, since I can connect via SQL Plus or Toad, but it is strange in that it has a different SID from Service name, as noted.
LANOPSDEV.WORLD =
  (DESCRIPTION =
   (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC )(KEY = LANDNML))
    (ADDRESS = (PROTOCOL = TCP )(HOST = corms343.funding.net)(PORT = 2504))
   )
   (CONNECT_DATA =
    (SID = LANOPSDEV)
    (SERVICE_NAME = LANDNML)
   )
  )
If anyone can provide feedback on this I welcome it. I'd shaken down Google for a day or two and most of these errors people were getting were due to incorrect TNSNAME configuration, which is not my problem.

Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 25 2011
Added on Oct 20 2011
6 comments
1,567 views