aspose file tools*
The moose likes JDBC and the fly likes oracle connection error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "oracle connection error" Watch "oracle connection error" New topic
Author

oracle connection error

prachee apte
Greenhorn

Joined: Mar 28, 2004
Posts: 1
when i write code through jsp page ,it works properly that is a connection is established
table is created records inserted etc.
but when i write code i.e class ,the code gets compiled but when i try to run the programe
the following errors occur.

D:\prachi_java>java tryjdbc
java.sql.SQLException: Specified driver could not be loaded due to system error
1157 (Oracle ODBC Driver).
D:\prachi_java>java tryjdbc
java.sql.SQLException: Specified driver could not be loaded due to system error
1157 (Oracle ODBC Driver).
both these errors come when i write the code in try ,catch block.
the below given error comes when i write the code without try ,catch block.
D:\prachi_java>java tryjdbc
Exception in thread "main" java.sql.SQLException: Specified driver could not be
loaded due to system error 1157 (Oracle ODBC Driver).
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:4089)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:4246)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:1136)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:1
48)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:167)
at java.sql.DriverManager.getConnection(DriverManager.java:457)
at java.sql.DriverManager.getConnection(DriverManager.java:137)
at tryjdbc.main(tryjdbc.java:23)
Shankar Narayana
Ranch Hand

Joined: Jan 08, 2003
Posts: 134
Hi,
Check whether the classes12.zip file , which contains the oracle driver is in your classpath or not.


"Failure is not when you fall down; its only when you fail to get up again."
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1132

Prachee,
The first part of your post has me confused. But in any case, according to the error details you have posted, it appears that the JVM cannot find the "Oracle ODBC Driver". For your information, this driver can be downloaded from the following Web page:
http://otn.oracle.com/software/tech/windows/odbc/index.html
Good Luck,
Avi.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: oracle connection error