Hi, That's because Tomcat bundles DBCP. If you want to separate them completely, put your copy in WEB-INF/lib, and the bundled copy in server/lib, and nothing for DBCP in the common or shared classloader repositories.
Yoav Shapira Millennium Research Informatics >-----Original Message----- >From: Jerome Lacoste [mailto:[EMAIL PROTECTED] >Sent: Tuesday, July 27, 2004 3:33 PM >To: Tomcat User >Subject: DBCP in Tomcat 5.0: must deploy some artifacts in >/common/lib(classes) ?! > >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: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
