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 Derby Embedded Driver ClassNotFoundException 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 "Derby Embedded Driver ClassNotFoundException" Watch "Derby Embedded Driver ClassNotFoundException" New topic

Derby Embedded Driver ClassNotFoundException

baris bakla

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

Wendy Gibbons

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
baris bakla

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

baris bakla

Joined: Dec 20, 2010
Posts: 3
Well, derby.jar should be available in /WEB-INF/lib
I agree. Here's the link:
subject: Derby Embedded Driver ClassNotFoundException
Similar Threads
Serializing more than one value manually
J Table Update (it makes me mad)
Simple ArrayList conundrum?
Generics problem- why not taking Animal, Object and super of Dog