错误: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

原文地址:https://www.cnblogs.com/lanhj/p/3322092.html