• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to verify JDBC version using oracle thin driver

 
Joy Vergis
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34229
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joy,
Is the database started on your machine? Are you able to connect via sqlplus?
 
Joy Vergis
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not able to connect via sqlplus. But when I use Enterprise Manager I am able to connect to the database.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic