Tomcat Memory Leak Using Struts2 xwork

4.1k Views Asked by At
SEVERE: The web application [/ppAdmin] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@126212dd]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@64c47498]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Mar 22, 2012 12:43:00 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [/ppAdmin] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@1dc2dad7]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@63ad6884]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Mar 22, 2012 12:43:00 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [/ppAdmin] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@1dc2dad7]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@da8e53c]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Mar 22, 2012 12:43:01 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/Nemo] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Mar 22, 2012 12:43:01 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/Nemo] registered the JDBC driver [net.sourceforge.jtds.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Mar 22, 2012 12:43:01 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/Nemo] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak.
Mar 22, 2012 12:43:01 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [/Nemo] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@28318d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@4ecd200f]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Mar 22, 2012 12:43:01 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [/Nemo] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@7cf3e133]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@6f461b5b]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Mar 22, 2012 12:43:01 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [/Nemo] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@28318d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@63ae2c6f]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Mar 22, 2012 12:43:01 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [/Nemo] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@28318d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@3fe75e89]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Mar 22, 2012 12:43:01 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [/Nemo] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@28318d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@6eef9525]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Mar 22, 2012 12:43:01 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080

WHY THE MEMORY LEAK WARNINGS ARE THERE???TOMCAT 6.0.35 ALLOWS GC TOOL.STILL IT GIVES SUCH WARNINGS.I AM BOTHERED ABOUT THESE WARNINGS.PLEASE HELP ME HOW TO MANAGE WITH THESE? ANY HELP WILL BE HIGHLY APPRECIATED..................THANKS IN ADVANCE.

1

There are 1 best solutions below

0
On

I had the same problem with Tomcat 6 and Struts2 2.1.8 webapp (maven 3.0.3 + eclipse keepler + JDK 1.6.0_22). I'm new in struts2+tomcat developing and I'm not used to solve this kind of problems.

After having made some changes on my code (and don't use svn nor git...), and after start using a mvn tomcat:redeploy task (witch confused me) I had this same behavior, and don't know what were causing to fail the deployment (the project keeps compiling ok).

The error seems so confusing and zero descriptive to me, and I've read many related posts. I've tryed to update the struts2 version, cause I've read that this kind of problems seems solved in struts2 2.3.3 (was using 2.1.8).

https://issues.apache.org/jira/browse/WW-3768

I dont't know why I was just reading catalina log:

SEVERE: Error filterStart
12/02/2014 10:46:23 org.apache.catalina.core.StandardContext start
SEVERE: Context [/validador] startup failed due to previous errors

The answer was very close, in localhost-date.log! That point me to a bad declared action in struts.xml, so simple to solve and so descriptive, but so dificult to figure out just reading catalina log.

SEVERE: Exception starting filter struts2
Unable to load configuration. - action - file:/C:/apps/apache-tomcat-    6.0.39/webapps/validador/WEB-INF/classes/struts.xml:74:83
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:501)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
...
...
Caused by: Action class [aoc.action.signature.CompletePDFUpload] not found - action - file:/C:/apps/apache-tomcat-6.0.39/webapps/validador/WEB-INF/classes/struts.xml:74:83

I hope someone else missed to check the correct log and solve as easy as me their problem.