Tomcat can';t从war文件启动我的web应用程序

Tomcat can';t从war文件启动我的web应用程序,tomcat,tomcat7,war,playframework-2.3,Tomcat,Tomcat7,War,Playframework 2.3,我的应用程序最初是用Play开发的!框架版本2.3 我正在尝试使用Tomcat7从war文件运行我的web应用程序 启动时,tomcat会记录以下内容: Sep 13, 2015 12:28:54 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat7/common], exists: [false], isDirector

我的应用程序最初是用Play开发的!框架版本2.3

我正在尝试使用Tomcat7从war文件运行我的web应用程序

启动时,tomcat会记录以下内容:

Sep 13, 2015 12:28:54 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/common], exists: [false], isDirectory: [false], canRead: [false]
Sep 13, 2015 12:28:55 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/server/classes], exists: [false], isDirectory: [false], canRead: [false]
Sep 13, 2015 12:28:55 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/server], exists: [false], isDirectory: [false], canRead: [false]
Sep 13, 2015 12:28:55 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/shared/classes], exists: [false], isDirectory: [false], canRead: [false]
Sep 13, 2015 12:28:55 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/shared], exists: [false], isDirectory: [false], canRead: [false]
Sep 13, 2015 12:29:10 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Sep 13, 2015 12:29:10 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 13170 ms
Sep 13, 2015 12:29:10 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 13, 2015 12:29:10 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu)
Sep 13, 2015 12:29:11 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/manager.xml
Sep 13, 2015 12:29:12 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [177] milliseconds.
Sep 13, 2015 12:29:13 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/host-manager.xml
Sep 13, 2015 12:29:13 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/tomcat7/webapps/confscheduler.war
Sep 13, 2015 12:29:27 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Sep 13, 2015 12:29:27 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/confscheduler] startup failed due to previous errors
Sep 13, 2015 12:29:27 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/confscheduler] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Sep 13, 2015 12:29:27 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/confscheduler] registered the JDBC driver [play.utils.ProxyDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Sep 13, 2015 12:29:27 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/confscheduler] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
Sep 13, 2015 12:29:27 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/confscheduler] appears to have started a thread named [BoneCP-keep-alive-scheduler] but has failed to stop it. This is very likely to create a memory leak.
Sep 13, 2015 12:29:27 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/confscheduler] appears to have started a thread named [BoneCP-max-alive-scheduler] but has failed to stop it. This is very likely to create a memory leak.
Sep 13, 2015 12:29:27 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/confscheduler] appears to have started a thread named [BoneCP-pool-watch-thread] but has failed to stop it. This is very likely to create a memory leak.
Sep 13, 2015 12:29:27 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/confscheduler] appears to have started a thread named [net.sf.ehcache.CacheManager@518fdf9] but has failed to stop it. This is very likely to create a memory leak.
Sep 13, 2015 12:29:27 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT
Sep 13, 2015 12:29:28 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Sep 13, 2015 12:29:28 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 17500 ms
Sep 13, 2015 12:29:58 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8080"]
Sep 13, 2015 12:29:58 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Sep 13, 2015 12:29:58 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8080"]
Sep 13, 2015 12:29:58 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
Sep 13, 2015 12:41:56 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/common/classes], exists: [false], isDirectory: [false], canRead: [false]
Sep 13, 2015 12:41:56 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/common], exists: [false], isDirectory: [false], canRead: [false]
Sep 13, 2015 12:41:56 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/server/classes], exists: [false], isDirectory: [false], canRead: [false]
Sep 13, 2015 12:41:56 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/server], exists: [false], isDirectory: [false], canRead: [false]
Sep 13, 2015 12:41:56 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/shared/classes], exists: [false], isDirectory: [false], canRead: [false]
Sep 13, 2015 12:41:56 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/shared], exists: [false], isDirectory: [false], canRead: [false]
Sep 13, 2015 12:41:56 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Sep 13, 2015 12:41:56 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 459 ms
Sep 13, 2015 12:41:56 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 13, 2015 12:41:56 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu)
Sep 13, 2015 12:41:56 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/manager.xml
Sep 13, 2015 12:41:57 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/host-manager.xml
Sep 13, 2015 12:41:57 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/tomcat7/webapps/confscheduler.war
Sep 13, 2015 12:42:02 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Sep 13, 2015 12:42:02 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/confscheduler] startup failed due to previous errors
Sep 13, 2015 12:42:02 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/confscheduler] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Sep 13, 2015 12:42:02 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/confscheduler] registered the JDBC driver [play.utils.ProxyDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Sep 13, 2015 12:42:02 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/confscheduler] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
Sep 13, 2015 12:42:02 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/confscheduler] appears to have started a thread named [BoneCP-keep-alive-scheduler] but has failed to stop it. This is very likely to create a memory leak.
Sep 13, 2015 12:42:02 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/confscheduler] appears to have started a thread named [BoneCP-max-alive-scheduler] but has failed to stop it. This is very likely to create a memory leak.
Sep 13, 2015 12:42:02 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/confscheduler] appears to have started a thread named [BoneCP-pool-watch-thread] but has failed to stop it. This is very likely to create a memory leak.
Sep 13, 2015 12:42:02 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/confscheduler] appears to have started a thread named [net.sf.ehcache.CacheManager@7009c732] but has failed to stop it. This is very likely to create a memory leak.
Sep 13, 2015 12:42:02 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT
Sep 13, 2015 12:42:02 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Sep 13, 2015 12:42:02 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5882 ms
Sep 13, 2015 12:43:02 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already.  Could not load com.mysql.jdbc.DatabaseMetaData$9.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1610)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569)
    at com.mysql.jdbc.DatabaseMetaData.getTables(DatabaseMetaData.java:5260)
    at com.jolbox.bonecp.BoneCP.isConnectionHandleAlive(BoneCP.java:713)
    at com.jolbox.bonecp.ConnectionTesterThread.run(ConnectionTesterThread.java:103)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

Sep 13, 2015 12:43:02 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already.  Could not load ch.qos.logback.classic.spi.ThrowableProxy.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1610)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569)
    at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:121)
    at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:440)
    at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:396)
    at ch.qos.logback.classic.Logger.error(Logger.java:559)
    at com.jolbox.bonecp.ConnectionTesterThread.run(ConnectionTesterThread.java:146)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
下面是我的catalina.log的一部分,我们可以在其中看到我的尝试:

Sep 12, 2015 9:48:49 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Sep 12, 2015 9:48:49 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/confscheduler] startup failed due to previous errors
Sep 12, 2015 9:48:49 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/confscheduler] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Sep 12, 2015 9:48:49 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/confscheduler] registered the JDBC driver [play.utils.ProxyDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Sep 12, 2015 9:48:49 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/confscheduler] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
Sep 12, 2015 9:48:49 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/confscheduler] appears to have started a thread named [BoneCP-keep-alive-scheduler] but has failed to stop it. This is very likely to create a memory leak.
Sep 12, 2015 9:48:49 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/confscheduler] appears to have started a thread named [BoneCP-max-alive-scheduler] but has failed to stop it. This is very likely to create a memory leak.
Sep 12, 2015 9:48:49 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/confscheduler] appears to have started a thread named [BoneCP-pool-watch-thread] but has failed to stop it. This is very likely to create a memory leak.
Sep 12, 2015 9:48:49 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/confscheduler] appears to have started a thread named [net.sf.ehcache.CacheManager@6a0b76a6] but has failed to stop it. This is very likely to create a memory leak.
.war文件是根据我的剧本创建的!Framework2.3应用程序通过使用该插件,我确实遵循了该项目的教程,但我不知道问题是来自war文件还是TomcatServlet

如果你知道我做错了什么,或者什么能帮助我克服这个问题,请告诉我


感谢您的帮助

除此之外还有其他错误吗?由于以前的错误,Message
启动失败
意味着在显示该错误时该错误已经发生。@Gary我添加了启动日志,该日志似乎有很多警告,并尝试首次启动我的应用,这可能是前面的错误,因为这是在我尝试之前发生的唯一其他事情。有时,一年中我会遇到1、2次动态取消部署/部署问题。也许单身汉会产生冲突,也许循环引用,也许加载器无法在两者之间说话。通常JDBC驱动程序、H2或ehacache会给出问题。重新加载整个Tomcat会有帮助吗?现实生活中的一个附加问题:新的部署需要新版本的框架库,而旧的框架库没有相同的结构仍然存在于容器中。@JacekCz你的意思是我应该尝试重新加载Tomcat吗?我已经用
服务tomcat7 stop/start
试过了。
Sep 12, 2015 9:48:49 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Sep 12, 2015 9:48:49 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/confscheduler] startup failed due to previous errors
Sep 12, 2015 9:48:49 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/confscheduler] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Sep 12, 2015 9:48:49 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/confscheduler] registered the JDBC driver [play.utils.ProxyDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Sep 12, 2015 9:48:49 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/confscheduler] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
Sep 12, 2015 9:48:49 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/confscheduler] appears to have started a thread named [BoneCP-keep-alive-scheduler] but has failed to stop it. This is very likely to create a memory leak.
Sep 12, 2015 9:48:49 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/confscheduler] appears to have started a thread named [BoneCP-max-alive-scheduler] but has failed to stop it. This is very likely to create a memory leak.
Sep 12, 2015 9:48:49 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/confscheduler] appears to have started a thread named [BoneCP-pool-watch-thread] but has failed to stop it. This is very likely to create a memory leak.
Sep 12, 2015 9:48:49 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/confscheduler] appears to have started a thread named [net.sf.ehcache.CacheManager@6a0b76a6] but has failed to stop it. This is very likely to create a memory leak.