I'm running FC6 with Tomcat 5.5.17 (standard rpm packages from the FC6
distribution).
The main problem I'm having is getting my database connection pool
setup.I'm getting a severe error that seems to be the source, but not
sure what the easy fix is. Obviously the
java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory
means Tomcat can't find a class it needs, but as I'm running all rpms
from FC6 I assumed everything would be 'plug and play'. Does anyone
have some suggestions for fixing this quick?
Thank you in advance.
Below is the server.xml...
<?xml version="1.0" encoding="UTF-8"?>
<Server>
<Listener className="org.apache.catalina.core.AprLifecycleListener"/>
<Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
<Listener
className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
<GlobalNamingResources>
<Environment
name="simpleValue"
type="java.lang.Integer"
value="30"/>
<Resource
name="jdbc/MSIWebDB"
type="javax.sql.DataSource"
maxWait="5000"
password="boo"
url="jdbc:mysql://msisql.inside.msi:3306/msi_intranet"
maxActive="4"
driverClassName="com.mysql.jdbc.Driver"
username="msi_intranet"
maxIdle="2"/>
<Resource
auth="Container"
description="User database that can be updated and saved"
name="UserDatabase"
type="org.apache.catalina.UserDatabase"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml"/>
</GlobalNamingResources>
<Service
name="Catalina">
<Connector
port="8080"
redirectPort="8443"
maxSpareThreads="75"
maxThreads="150"
connectionTimeout="20000"
minSpareThreads="25">
</Connector>
<Connector
port="8009"
redirectPort="8443"
protocol="AJP/1.3">
</Connector>
<Engine
defaultHost="localhost"
name="Catalina">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
<Host
appBase="webapps"
name="localhost">
</Host>
</Engine>
</Service>
</Server>
Below are the server logs from startup...
10-May-07 4:06:51 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/gcj-4.1.1
10-May-07 4:06:51 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
10-May-07 4:06:51 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 837 ms
10-May-07 4:06:51 PM org.apache.catalina.core.NamingContextListener addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not create resource factory instance
10-May-07 4:06:51 PM org.apache.catalina.mbeans.GlobalResourcesLifecycleListener createMBeans
SEVERE: Exception processing Global JNDI Resources
javax.naming.NamingException: Could not create resource factory instance
at org.apache.naming.factory.ResourceFactory.getObjectInstance(naming-factory-5.5.17.jar.so)
at javax.naming.spi.NamingManager.getObjectInstance(libgcj.so.7rh)
at org.apache.naming.NamingContext.lookup(naming-factory-5.5.17.jar.so)
at org.apache.naming.NamingContext.lookup(naming-factory-5.5.17.jar.so)
at org.apache.naming.NamingContextBindingsEnumeration.nextElementInternal(naming-resources-5.5.17.jar.so)
at org.apache.naming.NamingContextBindingsEnumeration.next(naming-resources-5.5.17.jar.so)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(catalina-5.5.17.jar.so7ygbw0.so)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(catalina-5.5.17.jar.so7ygbw0.so)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(catalina-5.5.17.jar.so7ygbw0.so)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(catalina-5.5.17.jar.so7ygbw0.so)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(catalina-5.5.17.jar.so7ygbw0.so)
at org.apache.catalina.core.StandardServer.start(catalina-5.5.17.jar.so7ygbw0.so)
at org.apache.catalina.startup.Catalina.start(catalina-5.5.17.jar.so7ygbw0.so)
at java.lang.reflect.Method.invoke(libgcj.so.7rh)
at org.apache.catalina.startup.Bootstrap.start(bootstrap.jar.so)
at org.apache.catalina.startup.Bootstrap.main(bootstrap.jar.so)
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory not found in org.apache.catalina.loader.StandardClassLoader{urls=[file:/var/lib/tomcat5/common/classes/,file:/var/lib/tomcat5/common/i18n/tomcat-i18n-en.jar,file:/var/lib/tomcat5/common/i18n/tomcat-i18n-fr.jar,file:/var/lib/tomcat5/common/i18n/tomcat-i18n-es.jar,file:/var/lib/tomcat5/common/i18n/tomcat-i18n-ja.jar,file:/usr/share/java/xml-commons-apis-1.3.02.jar,file:/usr/share/java/xerces-j2-2.7.1.jar,file:/usr/share/java/jakarta-commons-collections-3.1.jar,file:/usr/share/java/libgcj-4.1.1.jar,file:/usr/share/java/jakarta-commons-el-1.0.jar,file:/usr/share/java/tomcat5-jsp-2.0-api-5.5.17.jar,file:/usr/share/java/libgcj-4.1.1.jar,file:/usr/share/java/classpathx-jaf-1.0.jar,file:/usr/share/java/ant-1.6.5.jar,file:/var/lib/tomcat5/common/lib/mysql-connector-java-5.0.5-bin.jar,file:/usr/share/java/jasper5-runtime-5.5.17.jar,file:/usr/share/java/tomcat5/naming-resources-5.5.17.jar,file:/usr/share/java/geronimo/spec-jta-1.0.1B-rc2.jar,file:/usr/share/java/tomcat5-servlet-2.4-api-5.5.17.jar,file:/usr/share/java/jakarta-commons-pool-1.3.jar,file:/usr/share/java/classpathx-mail-1.3.1-monolithic-1.1.1.jar,file:/usr/share/java/jasper5-compiler-5.5.17.jar,file:/usr/share/java/jakarta-commons-logging-api-1.0.4.jar,file:/usr/share/java/jakarta-commons-dbcp-1.2.1.jar,file:/usr/share/eclipse/plugins/org.eclipse.jdt.core_3.2.3.v_686_R32x.jar,file:/usr/share/java/mx4j/mx4j-3.0.1.jar,file:/usr/share/java/tomcat5/naming-factory-5.5.17.jar], parent=gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/lib/jvm/java/lib/tools.jar,file:/usr/share/tomcat5/bin/bootstrap.jar,file:/usr/share/tomcat5/bin/commons-logging-api.jar,file:/usr/share/java/mx4j/mx4j-impl.jar,file:/usr/share/java/mx4j/mx4j-jmx.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}}
at java.net.URLClassLoader.findClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at java.lang.Class.forName(libgcj.so.7rh)
at java.lang.Class.forName(libgcj.so.7rh)
at org.apache.naming.factory.ResourceFactory.getObjectInstance(naming-factory-5.5.17.jar.so)
...15 more
10-May-07 4:06:51 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
10-May-07 4:06:51 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
10-May-07 4:06:51 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
10-May-07 4:06:54 PM org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
10-May-07 4:06:54 PM org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validator/validation.xml'
10-May-07 4:06:56 PM org.apache.catalina.core.ApplicationContext log
INFO: action: []: Verifying ModuleConfig for this module
10-May-07 4:06:56 PM org.apache.catalina.core.ApplicationContext log
INFO: action: []: Verification of ModuleConfig has been completed
10-May-07 4:06:56 PM org.apache.struts.webapp.example.memory.MemoryDatabasePlugIn init
INFO: Initializing memory database plug in from '/WEB-INF/database.xml'
10-May-07 4:06:56 PM org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
10-May-07 4:06:56 PM org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
10-May-07 4:06:58 PM org.apache.struts.tiles.TilesPlugin initDefinitionsFactory
INFO: Tiles definition factory loaded for module ''.
10-May-07 4:06:58 PM org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
10-May-07 4:06:58 PM org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'