aspose file tools*
The moose likes JDBC and the fly likes Derby Embedded Driver ClassNotFoundException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Derby Embedded Driver ClassNotFoundException" Watch "Derby Embedded Driver ClassNotFoundException" New topic
Author

Derby Embedded Driver ClassNotFoundException

baris bakla
Greenhorn

Joined: Dec 20, 2010
Posts: 3
My main problem is I have a class, Database.java, that access and updates the JDBC Derby database. Using unit test class, Database.java passes but using a servlet it throws exception. What can be the reason?
Below the codes are available.
I have a program Database.java which is


I wrote a unit test for class DatabaseTest which successfully tests and verifies the Database class


But when call the Database instance from the servlet Voter, it gives the ClassNotFoundException


The code of the servlet Voter.java

Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

Welcome to the ranch Baris (is Baris your first name?)
here is a very useful (hopefully) link to one of our in house FAQs http://www.coderanch.com/how-to/java/JdbcConnectionQuestions
baris bakla
Greenhorn

Joined: Dec 20, 2010
Posts: 3
yes, it is my first name.

thanks.
baris bakla
Greenhorn

Joined: Dec 20, 2010
Posts: 3
Well, derby.jar should be available in /WEB-INF/lib
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Derby Embedded Driver ClassNotFoundException