• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

servlet accessing database problem

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic