Reputation: 557
My application seems to work alright, but when I stop the server I get these messages.
I don´t manually start any thread, but I´m new to these technologies and I´m not sure how they work internally.
I´m using C3p0 to create a pool of connections, and maybe there is a leak because the connections are not closing well, but I don´t know the right way to do it. But it seems for the ammount of messages that might be more problems.
Please, could someone tell me what does this all means and how could I solve the memory leaks?
Please excuse my deficient English. Thank you all.
...
Information: Closing Spring root WebApplicationContext
jun 12, 2014 2:32:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
Severe: The web application [/Consulta] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak.
jun 12, 2014 2:32:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
Severe: The web application [/Consulta] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0] but has failed to stop it. This is very likely to create a memory leak.
jun 12, 2014 2:32:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
Severe: The web application [/Consulta] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1] but has failed to stop it. This is very likely to create a memory leak.
jun 12, 2014 2:32:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
Severe: The web application [/Consulta] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2] but has failed to stop it. This is very likely to create a memory leak.
jun 12, 2014 2:32:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
Severe: The web application [/Consulta] appears to have started a thread named [MultiThreadedHttpConnectionManager cleanup] but has failed to stop it. This is very likely to create a memory leak.
jun 12, 2014 2:32:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
Severe: The web application [/Consulta] appears to have started a thread named [Timer-1] but has failed to stop it. This is very likely to create a memory leak.
jun 12, 2014 2:32:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
Severe: The web application [/Consulta] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0] but has failed to stop it. This is very likely to create a memory leak.
jun 12, 2014 2:32:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
Severe: The web application [/Consulta] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1] but has failed to stop it. This is very likely to create a memory leak.
jun 12, 2014 2:32:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
Severe: The web application [/Consulta] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2] but has failed to stop it. This is very likely to create a memory leak.
jun 12, 2014 2:32:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
Severe: The web application [/Consulta] appears to have started a thread named [Timer-2] but has failed to stop it. This is very likely to create a memory leak.
jun 12, 2014 2:32:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
Severe: The web application [/Consulta] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0] but has failed to stop it. This is very likely to create a memory leak.
jun 12, 2014 2:32:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
Severe: The web application [/Consulta] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1] but has failed to stop it. This is very likely to create a memory leak.
jun 12, 2014 2:32:09 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
Severe: The web application [/Consulta] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2] but has failed to stop it. This is very likely to create a memory leak.
jun 12, 2014 2:32:09 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
Severe: The web application [/Consulta] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@aa7d6e]) and a value of type [org.apache.myfaces.config.RuntimeConfig] (value [org.apache.myfaces.config.RuntimeConfig@110d045]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
jun 12, 2014 2:32:09 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
Severe: The web application [/Consulta] created a ThreadLocal with key of type [org.apache.xml.security.algorithms.SignatureAlgorithm$3] (value [org.apache.xml.security.algorithms.SignatureAlgorithm$3@10f67f1]) and a value of type [java.util.HashMap] (value [{http://vvv.w3.org/2000/09/xmldsig#rsa-sha1=Sun RSA private CRT key, 2048 bits
jun 12, 2014 2:32:09 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
Severe: The web application [/Consulta] created a ThreadLocal with key of type [org.apache.xml.security.algorithms.MessageDigestAlgorithm$1] (value [org.apache.xml.security.algorithms.MessageDigestAlgorithm$1@711132]) and a value of type [java.util.HashMap] (value [{http://vvv.w3.org/2000/09/xmldsig#sha1=SHA-1 Message Digest from SUN, <initialized>
}]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
jun 12, 2014 2:32:09 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
Severe: The web application [/Consulta] created a ThreadLocal with key of type [org.apache.myfaces.el.convert.VariableResolverToELResolver$1] (value [org.apache.myfaces.el.convert.VariableResolverToELResolver$1@1200ec5]) and a value of type [java.util.HashSet] (value [[]]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
jun 12, 2014 2:32:09 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
Severe: The web application [/Consulta] created a ThreadLocal with key of type [org.apache.xml.security.utils.UnsyncBufferedOutputStream$1] (value [org.apache.xml.security.utils.UnsyncBufferedOutputStream$1@1a9e49c]) and a value of type [byte[]] (value [[B@dfebc1]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
jun 12, 2014 2:32:09 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
Severe: The web application [/Consulta] created a ThreadLocal with key of type [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1] (value [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1@eedcc3]) and a value of type [byte[]] (value [[B@1dfadaa]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
jun 12, 2014 2:32:09 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
Severe: The web application [/Consulta] created a ThreadLocal with key of type [org.apache.axis.utils.XMLUtils.ThreadLocalDocumentBuilder] (value [org.apache.axis.utils.XMLUtils$ThreadLocalDocumentBuilder@b1691a]) and a value of type [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl] (value [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl@16b470a]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
jun 12, 2014 2:32:09 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
Severe: The web application [/Consulta] created a ThreadLocal with key of type [org.apache.xml.security.algorithms.SignatureAlgorithm$1] (value [org.apache.xml.security.algorithms.SignatureAlgorithm$1@4e554]) and a value of type [java.util.HashMap] (value [{http://vvv.w3.org/2000/09/xmldsig#rsa-sha1=org.apache.xml.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA1@16bf810}]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.
jun 12, 2014 2:32:10 PM org.apache.coyote.http11.Http11Protocol destroy
Information: Parando Coyote HTTP/1.1 en puerto http-8080
jun 12, 2014 2:32:10 PM org.apache.coyote.http11.Http11Protocol destroy
Information: Parando Coyote HTTP/1.1 en puerto http-8443
Upvotes: 1
Views: 7867
Reputation: 9293
For com.mchange.v2.async.ThreadPoolAsynchronousRunner
see How to shutdown connection pool on context unload?. The answer refers to Spring but if you don't use Spring you can call the close()
method of com.mchange.v2.c3p0.ComboPooledDataSource
in a ServletContextListener
.
For Timer-0
, if the solution above is not enough, see Catalina.out Memory leak error (especially my own answer: https://stackoverflow.com/a/23336094/685806).
Upvotes: 1