tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DAVID TURNER <DTUR...@nhbb.com>
Subject Tomcat 5.5.4- ClassNotFoundException:org.apache.commons.dbcp.BasicDataSourceFactory
Date Wed, 02 Feb 2005 18:25:51 GMT
I'm getting the below WARNING when Tomcat 5.5.4 starts up on Windows 2000 
server:

Feb 2, 2005 10:50:49 AM org.apache.catalina.core.NamingContextListener 
addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could 
not create resource factory, 
ClassNotFoundException:org.apache.commons.dbcp.BasicDataSourceFactory

I have a webapp that is trying to use JDBC DataSource pooling (context 
shown below).  It's when the webapp is being deployed and it's trying to 
register the resource that the error is encountered.   The only 
BasicDataSourceFactory class that I can find is in naming-factory-dbcp.jar 
file in common/lib but that has a package structure of 
org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory.  I've tried using this 
class instead, but Tomcat still is looking for 
org.apache.commons.dbcp.BasicDataSourceFactory.  If I remove the factory 
property from the context then the error goes away on Windows 2000 Server.

What I find even more puzzling is that this error doesn't occur on my 
Tomcat 5.5.4 that's running on Windows XP Professional.

Where is org.apache.commons.dbcp.BasicDataSourceFactory?  Why am I not 
encountering this on Windows XP?



<Context debug="0" privileged="true">

  <!-- the jdbc driver's jar needs to go into $CATALINA_HOME/common/lib 
-->
  <Resource name="jdbc/as400" auth="Container"
                type="javax.sql.DataSource" 
                factory="org.apache.commons.dbcp.BasicDataSourceFactory" 
                maxActive="20" 
                maxIdle="10"
                maxWait="-1"
                removeAbandoned="true" 
                removeAbandonedTimeout="60"
                logAbandoned="true"
                driverClassName="com.ibm.as400.access.AS400JDBCDriver"
 
url="jdbc:as400://a53pb3;naming=system;libraries=,pgmdbt,caelib;errors=full"
                username="userid" 
                password="password"/> 
</Context>




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message