严重: A web application created a ThreadLocal with key of type...

本文讨论了Tomcat 6.0.25版本后引入的一种内存泄漏检查机制导致的问题,并提供了两种解决方案:一是使用低版本Tomcat;二是关闭server.xml中的相关监听。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

严重: A web application created a ThreadLocal with key of type [null] (value [com.sun.faces.config.ConfigureListener$1@1c4e792]) and a value of type [null] (value [null]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.


http://confluence.atlassian.com/pages/viewpage.action?pageId=218275753
看看老外的这篇,好像就是在讲这个问题,原因大概是说tomcat 6.025之后引入了一种内存泄露的检查机制,会把不能垃圾收集的对像做日志


第一种解决办法:

使用低于6版本的tomcat

第二种解决办法:

在tomcat的server.xml文件中把


这个监听给关了

如果还解决不了,重启一下机器试试。


PS:http://wiki.apache.org/tomcat/MemoryLeakProtection
01-Jul-2025 18:26:22.896 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [/ecm-sf5-cn] startup failed due to previous errors 01-Jul-2025 18:26:22.968 WARNING [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ecm-sf5-cn] appears to have started a thread named [Catalina-utility-2] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:4825) org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1172) org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1176) org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1176) org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1154) java.base@17.0.12/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) java.base@17.0.12/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) java.base@17.0.12/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) java.base@17.0.12/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) java.base@17.0.12/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) java.base@17.0.12/java.lang.Thread.run(Thread.java:840) 01-Jul-2025 18:26:22.968 WARNING [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ecm-sf5-cn] appears to have started a thread named [DefaultQuartzScheduler_QuartzSchedulerThread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.base@17.0.12/java.lang.Object.wait(Native Method) org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:427) 01-Jul-2025 18:26:22.977 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ecm-sf5-cn] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@3777677a]) and a value of type [com.documentum.web.env.app.AppServerEnvironment] (value [[Name = App Server Environment, Description = App Server Environment Implementation, Major Version = 0, Minor Version = 1, Author = Documentum, Portal Description = App Server, Portal Version = x.x, Environment Base Version = 1.0, Environment Service Version = 6.0, Supports Dispatch Contract = true, Supports Theme Contract = true, Supports Error Contract = true, Supports FormOperationListener Contract = false, Supports Locale Contract = true, Supports Session Contract = true, Supports Tag Contract = false, Supports Render Contract = true, Supports Login Contract = false, Supports Security Contract = true, Supports ActionPrecondition Contract = false, Supports MessageService Contract = false, Supports SuperCredentials Contract = true, Supports Preference Contract = true, Supports ContentTransfer Contract = true]]) 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. [2025-07-01 06:26:22,998] Artifact ecm-sf5-cn: Error during artifact deployment. See server log for details.
最新发布
07-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值