Domanda

I have a problem with a Vaadin application, it creates some threads and Tomcat says that they could lead a memory leak problems. I don't create threads in a explicit way.

SEVERE: The web application [/MyApp] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak.
ott 29, 2012 9:52:00 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks

and:

SEVERE: The web application [/MyApp] created a ThreadLocal with key of type [org.apache.axiom.util.UIDGenerator$1] (value [org.apache.axiom.util.UIDGenerator$1@1f7b22b]) and a value of type [org.apache.axiom.util.UIDGeneratorImpl] (value [org.apache.axiom.util.UIDGeneratorImpl@d25438]) 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.
ott 29, 2012 9:52:00 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/MyApp] created a ThreadLocal with key of type [org.apache.axiom.util.UIDGenerator$1] (value [org.apache.axiom.util.UIDGenerator$1@1f7b22b]) and a value of type [org.apache.axiom.util.UIDGeneratorImpl] (value [org.apache.axiom.util.UIDGeneratorImpl@975b37]) 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.

This let the application very unstable.

During the development process this is the first time I have this error.

How can avoid these problems?

È stato utile?

Soluzione

Neither of these issues have anything to do with Vaadin at all.

You (or a library you are using) have created a java.util.Timer but has not cancelled it.

In addition, the "Threadlocal" issue appears to be caused by Apache Axiom, and appears to be fixed in Axiom 1.2.12 (See http://ws.apache.org/axiom/ and http://ws.apache.org/axiom/)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top