gpt4 book ai didi

java - 使用 Struts2 xwork 的 Tomcat 内存泄漏

转载 作者:行者123 更新时间:2023-11-28 23:05:46 24 4
gpt4 key购买 nike

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 工具。它仍然会发出此类警告。我对这些警告感到困扰。请帮助我如何处理这些警告?任何帮助将不胜感激................................提前致谢。

最佳答案

我在使用 Tomcat 6 和 Struts2 2.1.8 webapp (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

我不知道为什么我只是在阅读 catalina 日志:

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 中一个错误的声明操作,它很容易解决并且描述性很强,但是很难弄清楚仅仅阅读 catalina 日志。

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

我希望其他人错过了检查正确的日志并像我一样轻松解决他们的问题。

关于java - 使用 Struts2 xwork 的 Tomcat 内存泄漏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9818252/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com