Meaningless Drivel is fun!
The moose likes JDBC and Relational Databases and the fly likes JDBC Connectivity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "JDBC Connectivity" Watch "JDBC Connectivity" New topic

JDBC Connectivity

Himanshu Khanna

Joined: Aug 15, 2001
Posts: 29
Trying to connect to a remote DB (Personal Oracle 8.0.4 ) thru my Java program
First I tried using JDBC ODBC driver(sun.jdbc.odbc.JdbcOdbcDriver) . Here the run time error msg was -> java.sql.SQLException: [Microsoft][ODBC Driver Manager]Data source name or the established driver which is appointed are not found.
Than I moved to Oracle JDBC drive (oracle.jdbc.driver.OracleDriver).Now the run time error msg is ->java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
Kindly Help . I have to use Oracle driver as I believe they are faster than JDBC ODBC drivers.
Sunetra Saha
Ranch Hand

Joined: Feb 25, 2001
Posts: 77
Check the classpath - whether all your jdbc drivers are in the classpath or not. This is usually the problem.

Joined: Jun 14, 2001
Posts: 16
For the ODBC problem, sounds to me (a unix guy) like you haven't defined the ODBC source to use.
For the other, as someone else has said, it's a classpath problem.
Also, can you connect to Personal Oracle remotely? I thought that was the one restriction that it had, only allowing localhost connectivity.
Himanshu Khanna

Joined: Aug 15, 2001
Posts: 29
Yup , U are right Sunetra - setting the CLASSPATH solved the issue.
John , the 2 suggestions U have given are perfect.
ODBC - problem is DSN
Oracle - problem was CLASSPATH
Rgding connecting remotely to Personal Oracle , yes one can do so but U need to have Oracle Client installed(I think ).
I agree. Here's the link:
subject: JDBC Connectivity
It's not a secret anymore!