Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

JDBC driver not loaded...class loader problem?

 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I initialise my Connection Pool in PoolInit.jsp. It was working fine. But now I have redeployed the application on tomcat again and now it gives me "no suitable driver found" exception.
But then I wrote a jsp in which I created a JDBC connection without using Connection Pool. It worked. Then I called PoolInit.jsp and to my great surprise, my Connection Pool got initialized! I restarted the Tomcat and again it made me use this rude process to initialise the Pool.
Can anybody tell me the cause and remedy? Is it the problem of Class Loader?
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am facing similar type of problem.I am using oracle 9i jdbc driver.Please do help me ASAP.
Regards,
Vasu
[ May 11, 2004: Message edited by: Vasudevan Gopalan ]
 
author & internet detective
Posts: 40748
827
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sun has this error listed in their FAQ. It is probably a problem with your URL string.
Also, note that the original post was over a year ago, so the poster might not be around anymore.
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think I see what's going on. It looks like the JSP can see the Database Driver, but the Pooling code cannot. There is a complicated reason why loading in one causes it to be visible in the other, but I'm going to leave that for now.
Question: where are your jars located? I tend to put all web-app jars in the web-inf/lib and all classes in web-inf/classes, but that's just me. They could also be on the classpath, in jre/lib/ext, server/common or elsewhere in the application server classpath (for J2EE apps).
Dave
 
Vasudevan Gopalan
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am using Tomcat 4.1.29,Oracle 8.1.7 and Oracle 9i JDBC Driver. I am using DBPool for Connection Pooling I have put the DBPool.jar file in Shared/lib directory of Tomcat. I have also set the classpath for the JAR File pointing to this lib folder.When i restart the Tomcat my application(With Connection Pooling) is not running.After restarting the Tomcat i change by code without connection pooling it works.Now if i revert back the code again (with connection pooling) it works.Problem arises again after restarting the Tomcat.It also gives me "Driver Not found" error .
Help me on this.

Regards,
Vasu
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, but where is the jar for your database driver?
 
Vasudevan Gopalan
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is there in Shared/lib folder of tomcat and also in classpath
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure if this helps at all (I use DBCP for connection pooling in Tomcat 4.1.29).
I have to put the classes12.jar (I use the Oracle 9i Thin Driver) in the TOMCAT_HOME\common\lib folder. DBCP does not find the drivers in SHARED\LIB (I can't remember why, but it made sense when I read the ClassLoader howto in the Tomcat documentation).
- Chris
 
Vasudevan Gopalan
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is DBCP Connection Pooling works fine. If so i can use that.
 
reply
    Bookmark Topic Watch Topic
  • New Topic