Утечка памяти в Tomcat с использованием Struts2 xwork - PullRequest
0 голосов
/ 22 марта 2012
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

ПОЧЕМУ ПРЕДУПРЕЖДЕНИЯ ПО УТЕЧКЕ ПАМЯТИ ??? TOMCAT 6.0.35 ПОЗВОЛЯЕТ GC TOOL.STILL ЭТО ПРЕДОСТАВЛЯЕТ ТАКИЕ ПРЕДУПРЕЖДЕНИЯ.Любая помощь будет высоко оценена

1 Ответ

1 голос
/ 12 февраля 2014

У меня была такая же проблема с Tomcat 6 и веб-приложением Struts2 2.1.8 (maven 3.0.3 + eclipse keepler + JDK 1.6.0_22).Я новичок в разработке Struts2 + Tomcat, и я не привык решать подобные проблемы.

После внесения некоторых изменений в мой код (и не используйте svn, ни git ...),и после начала использования задачи mvn tomcat: redeploy (ведьма меня смутила) у меня было такое же поведение, и я не знаю, что вызывало сбой развертывания (проект продолжает компилироваться нормально).так запутанно и ноль описательно для меня, и я прочитал много связанных постов.Я попытался обновить версию struts2, потому что я читал, что такого рода проблемы, похоже, решены в Struts2 2.3.3 (использовался 2.1.8).

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

Я не знаю, почему я просто читал журнал каталины:

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

Ответ был очень близок, в localhost-date.log!Это указывает на плохое объявленное действие в struts.xml, настолько простое для решения и настолько наглядное, но настолько сложное, чтобы понять, просто читая логику каталины.войти и решить так же легко, как и я их проблемы.

...