aspose file tools*
The moose likes JDBC and the fly likes problem  with connecting to oracle through jdbc 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 "problem  with connecting to oracle through jdbc" Watch "problem  with connecting to oracle through jdbc" New topic
Author

problem with connecting to oracle through jdbc

sapana jain
Ranch Hand

Joined: Oct 24, 2007
Posts: 42
I wish to connect to oracle backend through jdbc program but i am getting following problem..........


java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

I am writting the code in netbeans 5.5 and I have followed the necessary steps to have oracle but then also i am getting the problem.......

please help
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

It seems like you do not have classes12.jar or ojdbc14.jar in your runtime path.


Shailesh


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
sapana jain
Ranch Hand

Joined: Oct 24, 2007
Posts: 42
No that is not the case I have added the classes12.jar but thenalso its not working....
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

  • How are you running your program, is it through netbeans only, then netbean by default includes everything in compile-time classpath.
  • try importing oracle.jdbc.driver.OracleDriver in your program to check, if you actually have access the the OracleDriver Class



  • Shailesh
    Paul Sturrock
    Bartender

    Joined: Apr 14, 2004
    Posts: 10336

    Originally posted by sapana jain:
    No that is not the case I have added the classes12.jar but thenalso its not working....


    A ClassNotFoundException only means one thing. How do you run your application?

    Also classes12.jar is specifically when your application runs JDK 1.3 or below. Are you using a very old version of the JDK? If not, I'd get the latest Oracle driver.


    JavaRanch FAQ HowToAskQuestionsOnJavaRanch
     
    It is sorta covered in the JavaRanch Style Guide.
     
    subject: problem with connecting to oracle through jdbc