0

我试图在centos5上的tomcat6中部署一个应用程序,但问题是应用程序无法启动我在“usr/local/tomcat/logs/catalina.out”中有一个登录,关于启动应用程序的最后几行是

Mar 1, 2013 10:24:54 PM org.apache.catalina.core.NamingContextListener
addResource
WARNING: Failed to register in JMX: javax.naming.NamingException:
Could not load resource factory class [Root exception is
java.lang.ClassNotFoundException:
org.apache.tomcat.jdbc.pool.DataSourceFactory]
Mar 1, 2013 10:24:54 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Mar 1, 2013 10:24:54 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [] startup failed due to previous errors
4

2 回答 2

0

我用谷歌搜索

Root exception is java.lang.ClassNotFoundException:
org.apache.tomcat.jdbc.pool.DataSourceFactory

并得到了这个,这听起来很有希望:java.lang.ClassNotFoundException: org.apache.tomcat.jdbc.pool DataSourceFactory

于 2013-03-01T22:56:08.950 回答
0

验证在您的 tomcat 安装文件夹中是否有一个包含文件 tomcat-dbcp.jar 的 lib 文件夹

在你的 context.xml 文件中,你应该有这样的东西:

<Context path="/YourApp"> 
 <Resource username="dbUser" url="jdbc:mysql://localhost:3306/dbName" 
     type="javax.sql.DataSource" removeAbandonedTimeout="120" removeAbandoned="true" 
     password="******" name="jdbc/dbName" 
     driverClassName="com.mysql.jdbc.Driver" autoReconnect="true" auth="Container"/> 
 </Context>
于 2013-03-01T23:02:23.943 回答