• Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting an Exception like NoClassDefFoundError

 
shiva mistry
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3012
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Greg
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!