This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Getting an Exception like NoClassDefFoundError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Getting an Exception like NoClassDefFoundError" Watch "Getting an Exception like NoClassDefFoundError" New topic
Author

Getting an Exception like NoClassDefFoundError

shiva mistry
Greenhorn

Joined: Feb 05, 2013
Posts: 10
When I am trying to run this code from console I getting an error like "Exception Thread main java.lang.NoClassDefFoundError: oracle/jdbc/driver/oracledriver " can any one help me ?I have already provided URL ,username and password in stdDAO object .

Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2833
    
  11

In order to create a JDBC connection to Oracle, which is what StudentDAO must be doing, you have to have the Oracle JDBC driver in your classpath. That's probably going to be in a file called ojdbc14.jar, ojdbc15.jar, or something like that. It depends on which versions of Oracle and Java you are using. The old, old Oracle JDBC driver was in classes12.zip, but I don't think anyone uses that anymore.
shiva mistry
Greenhorn

Joined: Feb 05, 2013
Posts: 10
Thanks Greg
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting an Exception like NoClassDefFoundError
 
Similar Threads
reading a file, then replacing a string...
Something is missing in my Switch method
errors uploading an image to the database
Help with array List
Loop for console input....