File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC Connectivity

 
Himanshu Khanna
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Thanks
 
Sunetra Saha
Ranch Hand
Posts: 77
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the classpath - whether all your jdbc drivers are in the classpath or not. This is usually the problem.
 
john_guthrie
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic