Tomcat无法从war文件

时间:2015-09-12 20:19:07

标签: tomcat tomcat7 war playframework-2.3

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

我正在尝试使用tomcat 7从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)

我们已经可以看到很多警告,但我不明白它们的含义,某些目录不存在但是我已经安装了我的tomcat,而传统的apt-get install通常会安装我需要的一切。

问题在于我无法使其工作,我试图阻止tomcat然后将war文件移动到webapps目录并再次启动tomcat:这并没有启动我的应用程序..

然后我连接到tomcat web应用程序管理器,我的应用程序(confscheduler)可见并且没有运行: Image of the manager where we can see that my webapp (confscheduler) is present

我尝试了我的webapp名称右侧的开始按钮,但经过一段时间后,经理显示了此消息: 失败 - 无法启动上下文路径/ confscheduler中的应用程序

FAIL - Application at context path /confscheduler could not be started

这是我的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文件是从我的Play中创建的!框架2.3使用play2war插件的应用程序,我真的按照项目的教程,但我不知道问题是来自war文件还是tomcat servlet。

如果你知道我做错了什么或者什么可以帮我解决这个问题,请告诉我。

感谢您的帮助

0 个答案:

没有答案