Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BC0D817AFF for ; Fri, 13 Mar 2015 08:52:38 +0000 (UTC) Received: (qmail 32733 invoked by uid 500); 13 Mar 2015 08:52:38 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 32696 invoked by uid 500); 13 Mar 2015 08:52:38 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 32685 invoked by uid 99); 13 Mar 2015 08:52:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Mar 2015 08:52:38 +0000 Date: Fri, 13 Mar 2015 08:52:38 +0000 (UTC) From: "Alessandro Canevese (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CXF-6298) Memory leak in tomcat webapp MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-6298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alessandro Canevese updated CXF-6298: ------------------------------------- Description: 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 the following code directly in a method: ... 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)... 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 accessing the ws pointed by the serviceUrl above. was: 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 the following code directly in a method: ... 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)... 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. > 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 the following code directly in a method: > ... > 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)... > > 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 accessing the ws pointed by the serviceUrl above. -- This message was sent by Atlassian JIRA (v6.3.4#6332)