錯誤:created a ThreadLocal with key of type ……but failed to remove it when the web application was stopped. This is very likely to create a memory leak.


tomcat reload顯示錯誤:SEVERE: The web application [/Interceptor] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@302b4e8e]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@6b326556]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.

在寫Annotation注解的時候,使用了@InterceptorRef(value="tt"),如果“tt”不存在,將會出現上面的問題

或者是在XML中action無法找到對應的class也會出錯

 

今天剛發現了另一種情況,當你用注解時指定的父包不存在也會出現這類問題:

 

@ParentPackage("default-struts")

其中default-struts寫反了,應該是struts-default

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM