Alessandro Canevese created CXF-6298:
----------------------------------------
Summary: Memory leak in tomcat webapp
Key: CXF-6298
URL: https://issues.apache.org/jira/browse/CXF-6298
Project: CXF
Issue Type: Bug
Components: JAX-WS Runtime
Affects Versions: 3.0.4
Environment: Tomcat 7.0.55
Reporter: Alessandro Canevese
I'm developing a J2EE webapp with Spring 4.1, Struts2, etc.. I'm not able to
redeploy my app under development more than a couple of times before a permgen
/ out of memory error is fired.
To see if it's my Spring configuration 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>
Nothing has changed. Sooner or later, 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.
Just to be clear, classes it.cai.auth.ws.core.service.* are those dynamically
created by CXF.
Reply
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)