tomcat关闭时Log4j2报错 Log4j Log4j2-TF-4-Scheduled-1 memory leak
Posted 学习笔记
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了tomcat关闭时Log4j2报错 Log4j Log4j2-TF-4-Scheduled-1 memory leak相关的知识,希望对你有一定的参考价值。
出错信息:
23-Sep-2017 17:43:18.964 警告 [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [license] appears to have started a thread named [Log4j2-TF-4-Scheduled-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
网上找了好多地方,后来偶然间在一个地方看到Make sure you are including log4j-web in your build.
把log4j-web-2.9.0.jar上传过去就可以了。不再报错
以上是关于tomcat关闭时Log4j2报错 Log4j Log4j2-TF-4-Scheduled-1 memory leak的主要内容,如果未能解决你的问题,请参考以下文章
log4j报错ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging o