【发布时间】:2013-02-26 12:09:13
【问题描述】:
在启动应用程序并立即关闭 Tomcat 后,我收到以下两个 Tomcat 警告:
Mrz 11, 2013 11:25:06 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
Schwerwiegend: The web application [] created a ThreadLocal with key of type [com.sun.xml.ws.api.server.ThreadLocalContainerResolver$1] (value [com.sun.xml.ws.api.server.ThreadLocalContainerResolver$1@9be26c]) and a value of type [com.sun.xml.ws.api.server.Container.NoneContainer] (value [com.sun.xml.ws.api.server.Container$NoneContainer@4c563]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Mrz 11, 2013 11:25:06 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
Schwerwiegend: The web application [] created a ThreadLocal with key of type [com.sun.xml.bind.v2.ClassFactory$1] (value [com.sun.xml.bind.v2.ClassFactory$1@13af0d9]) and a value of type [java.util.WeakHashMap] (value [{class javax.xml.bind.annotation.adapters.CollapsedStringAdapter=java.lang.ref.WeakReference@9a5a11, class com.sun.xml.ws.runtime.config.TubelineDefinition=java.lang.ref.WeakReference@18f22cf, class javax.xml.bind.annotation.W3CDomHandler=java.lang.ref.WeakReference@368055, class java.util.ArrayList=java.lang.ref.WeakReference@2350a9, class com.sun.xml.ws.runtime.config.TubeFactoryConfig=java.lang.ref.WeakReference@84a0f6, class com.sun.xml.ws.runtime.config.TubeFactoryList=java.lang.ref.WeakReference@1638d4f, class com.sun.xml.ws.runtime.config.MetroConfig=java.lang.ref.WeakReference@d259f1, class com.sun.xml.ws.runtime.config.Tubelines=java.lang.ref.WeakReference@f12fa}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Tomcat 拒绝关闭并挂起。我正在使用 com.sun.xml.ws.transport.http.servlet.WSSpringServlet。这个webapp应该如何正确关闭?
【问题讨论】:
-
我遇到了同样的问题!你找到解决办法了吗?
-
@user3146733 不幸的是没有。我写了一个关闭监听器,它杀死了剩余的线程。
-
谢谢!你在这个关机监听器中写了什么?你在哪里称呼这个监听器?
-
我浏览论坛时发现了类似的帖子,并会在这里分享。希望仍然可以提供帮助。 stackoverflow.com/questions/9864992/…
-
大家可以来这里吗,请订阅github.com/javaee/metro-jax-ws/issues/1145并+1这个问题,所以它得到了一些爱。