You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by DAVID TURNER <DT...@nhbb.com> on 2005/02/02 19:25:51 UTC
Tomcat 5.5.4- ClassNotFoundException:org.apache.commons.dbcp.BasicDataSourceFactory
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>