您的位置:首页 > 运维架构 > Tomcat

解决tomcat无法启动的一次bug

2017-08-01 10:55 441 查看
某天tomcat无法启动了,首先看到eclipse下的最后一个报错:

八月 01, 2017 10:42:35 上午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc

严重: The web application [/autotestsvr] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

八月 01, 2017 10:42:35 上午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc

严重: The web application [/autotestsvr] 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.

八月 01, 2017 10:42:35 上午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads

严重: The web application [/autotestsvr] 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.

我好像没做什么涉及到druid、jdbc的改动啊,上网查了一番druid,jdbc的unregister之类的帖子,有的说要升级到最新版,等等,无效。

继续往上翻日志: 

严重: A child container failed during start

java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1122)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)

这都是什么鬼? 

继续找,终于找到一个看起来比较好解决的问题了:E:\img目录不见了,这是我之前做其他事的时候改了名的。

八月 01, 2017 10:42:33 上午 org.apache.catalina.core.StandardContext resourcesStart

严重: Error starting static Resources

java.lang.IllegalArgumentException: Document base E:\img does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:136)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:5132)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5319)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

把E:\img目录改名回来,就ok了

这是因为在server.xml里面添加了这一行的原因: 

 <Context debug="0" docBase="E:\img" path="e_img"/> 

如果把这行去掉也行。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  tomcat 启动