tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jerome Lacoste <jer...@coffeebreaks.org>
Subject DBCP in Tomcat 5.0: must deploy some artifacts in /common/lib (classes) ?!
Date Tue, 27 Jul 2004 19:33:23 GMT
Hi,

I am deploying a J2EE app in Tomcat 5.0.27. The application uses
commons-dbcp.

I've found out that if I don't put the jocl file AND the DB drivers in
the $CATALINA_HOME/common/lib/ (classes) directory, the DBCP would fail.

Either the config file is not found

Caused by: java.sql.SQLException: Configuration file not found
        at org.apache.commons.dbcp.PoolingDriver.getConnectionPool
(PoolingDriver.java:132)
        at org.apache.commons.dbcp.PoolingDriver.connect
(PoolingDriver.java:170)
        at java.sql.DriverManager.getConnection(DriverManager.java:512)
        at java.sql.DriverManager.getConnection(DriverManager.java:193)

of the drivers are not found (even if registered manually) or .

Caused by: java.sql.SQLException: No suitable driver
        at java.sql.DriverManager.getConnection(DriverManager.java:532)
        at java.sql.DriverManager.getConnection(DriverManager.java:171)
        at
org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection
(DriverManagerConnectionFactory.java:48)
        at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject
(PoolableConnectionFactory.java:290)
        at org.apache.commons.pool.impl.GenericObjectPool.borrowObject
(GenericObjectPool.java:771)
        at org.apache.commons.dbcp.PoolingDriver.connect
(PoolingDriver.java:175)


I've tried to put those in the WEB-INF/lib/ (classes) and the
shared/lib/ (classes) but none solution worked.

That sounds like a ClassLoader issue to me, but according to the Tomcat
5.0 doc, I am doing the right thing.

Putting them in common/lib is a workaround I can accept now, but not for
long!

I am at a loss then. Is that problem specific to DBCP? Any idea?

Cheers,

Jerome


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message