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?
love your job and not your company;
...because you never know when your company will stop loving you!
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
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.
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