日期:2014-05-17  浏览次数:20693 次

自己弄的一个工程,只用了struts2,为什么每次部署到tomcat都报下面的错误啊?

2013-10-11 19:12:23 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
严重: The web application [/DDDDP02] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@efdd58]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@1acdfc3]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
2013-10-11 19:12:23 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
严重: The web application [/DDDDP02] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@96ac47]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@891a0]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
2013-10-11 19:12:23 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
严重: The web application [/DDDDP02] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@96ac47]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@90a278]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.

工程结构图如下:
struts2 tomcat 部署 错误

------解决方案--------------------
试试
在tomcat的server.xml文件中把   

 <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>     

这个监听给关了



------解决方案--------------------
看看这个第一种解决办法: 



使用低于6版本的tomcat 

第二种解决办法: 

在tomcat的server.xml文件中把 


这个监听给关了 

如果还解决不了,重启一下机器试试。 


PS:http://wiki.apache.org/tomcat/MemoryLeakProtection