aspose file tools*
The moose likes JDBC and the fly likes How to verify JDBC version using oracle thin driver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to verify JDBC version using oracle thin driver" Watch "How to verify JDBC version using oracle thin driver" New topic
Author

How to verify JDBC version using oracle thin driver

Joy Vergis
Ranch Hand

Joined: Sep 14, 2009
Posts: 45
I updated the classpath in environment variables to point to classes12.jar file location.

To verify the JDBC version I tried executing the below code:




But it throws the below error:

Exception in thread "main" java.sql.SQLException: Io exception: Connection refus
ed(DESCRIPTION=(TMP=)(VSNNUM=153092352)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=1250
5)(EMFI=4))))
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:404)

at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at JDBCVersion.main(JDBCVersion.java:12)

Please let me know what steps to follow to resolve it.



Thanks.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30764
    
156

Joy,
Is the database started on your machine? Are you able to connect via sqlplus?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Joy Vergis
Ranch Hand

Joined: Sep 14, 2009
Posts: 45
I am not able to connect via sqlplus. But when I use Enterprise Manager I am able to connect to the database.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to verify JDBC version using oracle thin driver