今日在重新部署項目時出現此問題,雖然對項目無影響,但問題就是問題。完整信息如下(使用idea工具):
十二月 05, 2015 11:44:27 上午 org.apache.catalina.startup.HostConfig undeploy
信息: Undeploying context []
2015-12-05 11:44:27 JRebel: Reloading class 'com.shyy.web.controller.anntation.UserController'.
2015-12-05 11:44:27 JRebel-Spring: Reconfiguring bean 'userController' [com.shyy.web.controller.anntation.UserController]
2015-12-05 11:44:27 JRebel-Spring: Reconfiguring bean 'userController' [com.shyy.web.controller.anntation.UserController]
十二月 05, 2015 11:44:27 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
嚴重: The web application [] 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.
十二月 05, 2015 11:44:27 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
嚴重: The web application [] 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.
[2015-12-05 11:44:28,265] Artifact shuyangyang:war: Artifact is being deployed, please wait...
十二月 05, 2015 11:44:51 上午 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(E:\Tomcat-7.0.59\apache-tomcat-7.0.59\webapps\ROOT\WEB-INF\lib\javax.el-api-2.2.4.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/el/Expression.class
十二月 05, 2015 11:44:51 上午 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(E:\Tomcat-7.0.59\apache-tomcat-7.0.59\webapps\ROOT\WEB-INF\lib\servlet-api-3.0.20100224.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
2015-12-05 11:44:55 JRebel-Spring: Monitoring Spring bean definitions in 'E:\Spring3\shuyangyang\target\classes\applicationContext.xml'.
2015-12-05 11:44:56 JRebel-Spring: Monitoring Spring bean definitions in 'E:\Spring3\shuyangyang\target\classes\dispatcher-servlet.xml'.
[2015-12-05 11:44:58,500] Artifact shuyangyang:war: Artifact is deployed successfully
[2015-12-05 11:44:58,500] Artifact shuyangyang:war: Deploy took 30,235 milliseconds
分析:
1.十二月 05, 2015 11:44:27 上午 org.apache.catalina.startup.HostConfig undeploy
在http://blog.csdn.net/aesop_wubo/article/details/7907047文章這樣介紹HostConfig :“HostConfig是一個生命周期監聽器類,在tomcat加載配置文件的時候被添加到Host之上。”但是這里的信息是undeploy,是表明HostConfig 未部署或者說是部署失敗?——但這樣解釋也很矛盾,因為后面出現了“Artifact is deployed successfully”。
2.嚴重: The web application [] 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.
這里說的是mysql驅動注冊失敗,原因是為了阻止內存泄露。關於memory leak,百度百科上有解釋,但不懂。
3.嚴重: The web application [] 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.
這里說的是web 容器重啟一個叫Abandoned connection cleanup thread的線程失敗。原因可能是這很像創建了一個內存泄露。
真正原因及解決方案待續。。