我正在用tomcat和jax-ws构建ws。 当我停止我的应用程序,通常在从日食重新部署,我得到这个消息:tomcat 7.0和jax-ws 2.2.5内存泄漏
25-mar-2012 16.21.16 com.sun.xml.ws.transport.http.servlet.WSServletDelegate destroy
INFO: WSSERVLET15: JAX-WS servlet destroyed
25-mar-2012 16.21.16 com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextDestroyed
INFO: WSSERVLET13: JAX-WS context listener destroyed
25-mar-2012 16.21.16 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
GRAVE: The web application [/xccm] created a ThreadLocal with key of type [com.sun.xml.ws.api.streaming.XMLStreamReaderFactory$Default$1] (value [[email protected]deaa13]) and a value of type [com.sun.xml.internal.stream.XMLInputFactoryImpl] (value [[email protected]]) 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.
陷与ClasspathHelper我发现com.sun.xml.ws.api.streaming.XMLStreamReaderFactory$Default$1
由jaxws-rt.jar
引用但是我并没有明确使用任何JAX-WS类在我的代码,除了:
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.xml.bind.JAXBContext;
而且据我所知tomcat的负载com.sun.xml.ws.transport.http.servlet.WSServlet
(和日志片断其他类)。
任何想法如何解决这个问题?
THX
你可以在调试中运行你的应用服务器,连接到它,把断点放到'ThreadLocal'类方法并进行部署吗?你会发现原因。 – 2012-03-27 21:10:23