java.lang.NoClassDefFoundError: org/apache/log4j/spi/ThrowableInformation

转载 2017年07月19日 08:47:58

1、错误描述

严重: Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener  
java.lang.NoClassDefFoundError: org/apache/log4j/spi/ThrowableInformation  
    at org.apache.log4j.spi.LoggingEvent.<init>(LoggingEvent.java:165)  
    at org.apache.log4j.Category.forcedLog(Category.java:391)  
    at org.apache.log4j.Category.log(Category.java:856)  
    at org.apache.commons.logging.impl.Log4JLogger.error(Log4JLogger.java:229)  
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:543)  
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:516)  
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:827)  
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:485)  
    at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:921)  
    at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:895)  
    at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:841)  
    at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:579)  
    at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:115)  
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4776)  
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5390)  
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)  
    at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3739)  
    at org.apache.catalina.startup.HostConfig.reload(HostConfig.java:1363)  
    at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1336)  
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1534)  
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:285)  
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)  
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)  
    at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1141)  
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1377)  
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1381)  
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1349)  
    at java.lang.Thread.run(Thread.java:745)  
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.spi.ThrowableInformation  
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1313)  
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1164)  
    ... 28 more  
四月 10, 2017 10:52:56 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc  
警告: The web application [cmp] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.  
四月 10, 2017 10:52:56 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc  
警告: The web application [cmp] 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.  
四月 10, 2017 10:52:56 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads  
警告: The web application [cmp] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:  
 java.lang.Object.wait(Native Method)  
 java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)  
 com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:43)  
四月 10, 2017 10:52:56 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads  
警告: The web application [cmp] appears to have started a thread named [Druid-ConnectionPool-Create-1065348511] 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.park(LockSupport.java:175)  
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)  
 com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:1824)  
四月 10, 2017 10:52:56 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads  
警告: The web application [cmp] appears to have started a thread named [Druid-ConnectionPool-Destroy-1065348511] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:  
 java.lang.Thread.sleep(Native Method)  
 com.alibaba.druid.pool.DruidDataSource$DestroyConnectionThread.run(DruidDataSource.java:1898)  
四月 10, 2017 10:52:56 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads  
警告: The web application [cmp] appears to have started a thread named [shiroCache] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:  
 java.lang.Object.wait(Native Method)  
 java.lang.Object.wait(Object.java:502)  
 java.util.TimerThread.mainLoop(Timer.java:526)  
 java.util.TimerThread.run(Timer.java:505)  
四月 10, 2017 10:52:56 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads  
警告: The web application [cmp] appears to have started a thread named [SessionValidationThread-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:1067)  
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)  
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  
 java.lang.Thread.run(Thread.java:745)  

2、错误原因
在项目启动时,出现这个错误,由错误提示可知是缺少jar,有关log4j的

3、解决办法

(1)检查Maven有没有将log4j有关jar下载下来

(2)重新编译项目,利用mvn clean install

(3)重新启动Tomcat服务器
转载于http://blog.csdn.net/you23hai45/article/details/70112462

java.lang.NoClassDefFoundError: org/apache/log4j/spi/ThrowableInformation

1、错误描述严重: Exception sending context destroyed event to listener instance of class org.springframewor...

java-错误 java.lang.NoClassDefFoundError: org/apache/log4j/Level

Failed to instantiate SLF4J LoggerFactory 错误: Reported exception: java.lang.NoClassDefFou...

java.lang.NoClassDefFoundError: Could not initialize class org.apache.log4j.Log4jLoggerFactory

(一) 现象与解决方法前些天在进行storm job的开发时候突然报了一个错误,记录一下Caused by: java.lang.NoClassDefFoundError: Could not ini...

java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z错误

008-8-21 13:22:26 org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.service() for se...

SSH框架搭建的问题---- java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z

jar包冲突   log4j.jar log4j-1.2.15.jar log4j-1.2.11.jar   删掉log4j-1.2.11.jar之后Ok

关于java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log

配置JFinal环境时,jar包已导入,web.xml已配置,Config也已经配置好,测试服务器时不停地出现Exception in thread "main" java.lang.NoSuchMe...

fix java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

最近一个spring boot项目,我和同事同样的环境,他能启动Application的main方法: import org.springframework.boot.SpringApplicatio...

Python java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory解决办法

在使用NLTK中的Stanford Parser Python接口时,会遇到报错信息: java.lang.NoClassDefFoundError: java.lang.NoClassDefFoun...
  • huludan
  • huludan
  • 2016年02月22日 16:36
  • 1525

Eclipse java.lang.NoClassDefFoundError: org/dom4j/io/SAXReade 错误解决方法

为什么我明明在Eclipse导入了dom4j的jar包,但是在实例化SAXReader类还是失败了? 原因:没有正确地导入jar包。...

java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder 异常

java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder 异常 Exception in thread "main" j...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:java.lang.NoClassDefFoundError: org/apache/log4j/spi/ThrowableInformation
举报原因:
原因补充:

(最多只允许输入30个字)