• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet accessing database problem

 
Luther Adon
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to access a mckoi database using tomcat through a servlet. At this point it seems to be failing just on the JDBCDriver getting a classnotfoundexception.
This is quite odd as it is not a simple pathing problem as my old accessing a database through an application programs work fine. Even more odd the error file comes as a type called "file" called ShowDeptServlet or ShowDeptServleta4bc9243 with a screen of errors that start with the aforementioned one and then org.apache.catalina.* many errors.
Not sure what to do at this point, help!
P.S. If you have Instant Java Servlets by Phil Hanna it is on page 84.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
system CLASSPATH (which your plain app uses) is not the same as the CLASSPATH in use by Tomcat 4.x. So in fact, it could be a simple path issue.

Do you have your database drivers in the application's WEB-INF/lib directory? Or in Tomcat's common/lib directory? Try both of those.
 
Luther Adon
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks muchly for the assistance. I fixed the classpath and the placement and it works better.
[ August 21, 2002: Message edited by: Luther Adon ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic