tomcat异常日志分析及处理
日志信息如下:
2015-10-29 18:39:49 org.apache.coyote.http11.Http11Protocol pause
信息: Pausing Coyote HTTP/1.1 on http-8088
2015-10-29 18:39:50 org.apache.catalina.core.StandardService stop
信息: Stopping service Catalina
2015-10-29 18:39:53 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/lmapp] 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.
2015-10-29 18:39:53 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/lmapp] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak.
2015-10-29 18:39:53 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/lmapp] created a ThreadLocal with key of type [com.sun.faces.util.Util$1] (value [com.sun.faces.util.Util$1@1d12614]) and a value of type [java.util.HashMap] (value [{com.sun.faces.patternCache={ = }}]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
2015-10-29 18:39:53 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/lmapp] created a ThreadLocal with key of type [net.sf.json.AbstractJSON$1] (value [net.sf.json.AbstractJSON$1@1af328]) and a value of type [java.util.HashSet] (value [[]]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
问题描述:一个web应用程序注册了JBDC驱动程序[com.mysql.jdbc.Driver]但Web应用程序时停止时未能注销。为了防止内存泄漏,JDBC驱动程序已被强行注册。
经过百度搜索,导致以上异常产生的原因可能是tomcat的版本问题。有人推荐了tomcat5.5.28绿色版本。
至于到底是不是这个原因,自己必须还得对开发的应用程序进行内存是否泄漏的检测操作。详情见博文“系统内存检测”。