On Monday 16 November 2009 15:00:32 Pid wrote:
> On 16/11/2009 13:54, Rainer Frey wrote:
> > I forgot a very important information: the JDBC driver is in tomcat/lib
> > because our server usually runs several instances of the same webapp, and
> > the customers have to add the JDBC driver themselves because we can't
> > supply them due to licensing issues.
>
> In your test servlet, can you add some logging to see which classloader
> the successfully loaded driver class has, the first time you start the app?
It is (as expected), the tomcat common classloader, also at reload.
INFO: DBTestServlet: Class org.postgresql.Driver loaded by
org.apache.catalina.loader.standardclassloa...@184ec44
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Tomcat start
Nov 16, 2009 3:12:11 PM org.apache.catalina.core.ApplicationContext log
INFO: DBTestServlet: connection established:
org.postgresql.jdbc4.jdbc4connect...@121177e
Nov 16, 2009 3:12:11 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Nov 16, 2009 3:12:11 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Nov 16, 2009 3:12:41 PM org.apache.catalina.core.ApplicationContext log
INFO: DBTestServlet: Class org.postgresql.Driver loaded by
org.apache.catalina.loader.standardclassloa...@184ec44
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Context reload
Nov 16, 2009 3:12:41 PM org.apache.catalina.core.ApplicationContext log
SEVERE: DBTestServlet: java.sql.SQLException: No suitable driver found for
jdbc:postgresql://127.0.0.1/inxmail
java.sql.SQLException: No suitable driver found for
jdbc:postgresql://127.0.0.1/inxmail
at java.sql.DriverManager.getConnection(DriverManager.java:602)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at com.inxmail.test.DBTestServlet.init(DBTestServlet.java:50)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
I uploaded the webapp again with this logging, and also uploaded the full
servlet source file to
http://download.inxmail.de/data/user/rfy/DBTestServlet.java
Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]