[ https://issues.apache.org/jira/browse/CXF-5492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14358983#comment-14358983 ]
Alessandro Canevese commented on CXF-5492: ------------------------------------------ I'm getting a similar problem with release 3.0.4 when undeploying a tomcat application with a Spring jaxws generated bean. To see if it's Spring fault, I've got rid of the jaxws bean and I've put directly in a method the following code: ... JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); Client client = dcf.createClient(serviceUrl + "?wsdl"); Object result = null; try { Object[] callResult = client.invoke(methodName, parameter); result = callResult[0]; } catch (Exception ex) { log.error(ex); } ...use of result (without storing it anywhere)... <end of method> When I undeploy the webapp I get a couple of the following: mar 12, 2015 5:46:05 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks Grave: The web application [/soci-operativi] created a ThreadLocal with key of type [com.sun.xml.bind.v2.ClassFactory$1] (value [com.sun.xml.bind.v2.ClassFactory$1@2379cbe3]) and a value of type [java.util.WeakHashMap] (value [{class it.cai.auth.ws.core.service.UserGroup=java.lang.ref.WeakReference@1138b647, class it.cai.auth.ws.core.service.GetUserDataResponse=java.lang.ref.WeakReference@2246f826, class java.util.ArrayList=java.lang.ref.WeakReference@614d985e, class it.cai.auth.ws.core.service.User=java.lang.ref.WeakReference@2d4e753a, class it.cai.auth.ws.core.service.Authority=java.lang.ref.WeakReference@79f24a12}]) 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. mar 12, 2015 5:46:05 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks Grave: The web application [/soci-operativi] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@11dd224a]) and a value of type [org.apache.cxf.BusFactory.BusHolder] (value [org.apache.cxf.BusFactory$BusHolder@4cf6316f]) 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. where, say, it.cai.auth.ws.core.service.User is a CXF dynamically created class. > ThreadLoad org.apache.cxf.BusFactory.BusHolder leak in Tomcat > ------------------------------------------------------------- > > Key: CXF-5492 > URL: https://issues.apache.org/jira/browse/CXF-5492 > Project: CXF > Issue Type: Bug > Components: Bus > Affects Versions: 2.7.6, 2.7.8, 2.7.14 > Environment: oracle jdk 7, windows7 x64 > Reporter: Alex O'Ree > > Upon web application redeploy (that calls a web service), I've been getting a > number of log warnings when either Tomcat shutdown's down or when the web app > is redeployed > Jan 12, 2014 10:12:28 PM org.apache.catalina.loader.WebappClassLoader > clearThreadLocalMap > SEVERE: A web application created a ThreadLocal with key of type [null] > (value [com.sun.xml.bind.v2.ClassFactory$1@fb0bc > 0e]) and a value of type [java.util.WeakHashMap] (value [{class > org.uddi.api_v3.BusinessList=java.lang.ref.WeakReference > @1c0a432e, class > org.uddi.api_v3.BusinessInfo=java.lang.ref.WeakReference@65c08f63, class > org.uddi.api_v3.BusinessInfos= > java.lang.ref.WeakReference@4505e0c5, class > org.uddi.api_v3.Description=java.lang.ref.WeakReference@4e7c8ea, class org.u > ddi.api_v3.Name=java.lang.ref.WeakReference@d377d2a, class > org.uddi.api_v3.ServiceInfo=java.lang.ref.WeakReference@35fa5 > 72d, class java.util.ArrayList=java.lang.ref.WeakReference@4671670a, class > javax.xml.bind.annotation.W3CDomHandler=java. > lang.ref.WeakReference@3f23e5a7, class > org.uddi.api_v3.ListDescription=java.lang.ref.WeakReference@4dba5753, class > org.u > ddi.api_v3.ServiceInfos=java.lang.ref.WeakReference@4bb3203}]) but failed to > remove it when the web application was stop > ped. To prevent a memory leak, the ThreadLocal has been forcibly removed. > Jan 12, 2014 10:12:28 PM org.apache.catalina.loader.WebappClassLoader > clearThreadLocalMap > SEVERE: A web application created a ThreadLocal with key of type > [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1 > dd06562]) and a value of type [org.apache.cxf.BusFactory.BusHolder] (value > [org.apache.cxf.BusFactory$BusHolder@5cb01438 > ]) but failed to remove it when the web application was stopped. To prevent a > memory leak, the ThreadLocal has been forc > ibly removed. -- This message was sent by Atlassian JIRA (v6.3.4#6332)