Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Derby Embedded Driver ClassNotFoundException

 
baris bakla
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1110
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, it is my first name.

thanks.
 
baris bakla
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, derby.jar should be available in /WEB-INF/lib
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic