gpt4 book ai didi

java - Tomcat 7 - java.lang.NoClassDefFoundError : org/apache/log4j/spi/ThrowableInformation

转载 作者:太空狗 更新时间:2023-10-29 22:56:55 28 4
gpt4 key购买 nike

我面临以下异常:

Mar 26, 2012 1:20:34 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already.
Could not load org.apache.log4j.spi.ThrowableInformation.
The eventual following stack trace is caused by an error thrown for debugging purposes
as well as to attempt to terminate the thread which caused the illegal access, and has
no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1562)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
at org.apache.log4j.spi.LoggingEvent.<init>(LoggingEvent.java:165)
at org.apache.log4j.Category.forcedLog(Category.java:391)
at org.apache.log4j.Category.error(Category.java:322)
at com.abc.supervisionmanager.Monitoring.run(Monitoring.java:205)
at java.lang.Thread.run(Thread.java:662)
Exception in thread "Thread_Monitoring" 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.error(Category.java:322)
at com.abc.supervisionmanager.Monitoring.run(Monitoring.java:205)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.spi.ThrowableInformation
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
... 5 more

我用谷歌搜索了这个异常,发现大多数答案都指出它是 tomcat 5.5 中的错误,它将在 5.5.28 版本中解决。

但是我目前使用 tomcat 7.11 和 log4j-1.2.16.jar 我仍然面临同样的问题。

最佳答案

对我来说,这个问题的解决方案(使用 Openbravo 3.0MP11 和 Tomcat 7.0.21 测试)是:

  1. WEB-INF/lib 中删除 log4j-1.2.16.jar
  2. 将 log4j jar 放入 Tomcat 的 lib 目录中。在 Ubuntu 11.10 中,这将是 /usr/share/tomcat7/lib

注意我的 Openbravo 特定用例:这确实解决了 log4j 问题,但后来我遇到了其他问题。

关于java - Tomcat 7 - java.lang.NoClassDefFoundError : org/apache/log4j/spi/ThrowableInformation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9872510/

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