struts2关于A web application created a ThreadLocal with key of type 异常解决办法

傷城~ 2022-06-13 02:30 187阅读 0赞

今天开始学习了struts2, 于是下了最新的版本struts2.2.3.1,在使用的过程中总是报错:A web application created a ThreadLocal with key of type , 尽管出现了这个错误,但是并不妨碍程序正常运行, 虽然程序虽然能正常运行,但是看的这个错误很是别扭,所以网上搜了一下看看,也就有了下面这篇文章

struts2关于A web application created a ThreadLocal with key of type 异常解决办法

created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@12c74b9]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@1a34544]) but failed to remove it。。。。

这类问题的解决办法:

  1. [ http://confluence.atlassian.com/pages/viewpage.action?pageId=218275753][http_confluence.atlassian.com_pages_viewpage.action_pageId_218275753]

看看老外的这篇,好像就是在讲这个问题,原因大概是说tomcat 6.025之后引入了一种内存泄露的检查机制,会把不能垃圾收集的对像做日志。

第一种解决办法:

使用低于6版本的tomcat

第二种解决办法:

在tomcat的server.xml文件(在tomcat的安装路径下的conf文件夹里)中把

这个监听给关了。

就是用把下面三句话括起来就可以啦。



发表评论

表情:
评论列表 (有 0 条评论,187人围观)

还没有评论,来说两句吧...

相关阅读