我正在用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