log4j错误
log4j:ERROR log4j called after unloading, see http://logging.apache.org/log4j/1.2/faq.html#unload.
java.lang.IllegalStateException: Class invariant violation
at org.apache.log4j.LogManager.getLoggerRepository(LogManager.java:199)
at org.apache.log4j.LogManager.getLogger(LogManager.java:228)
at org.apache.log4j.Logger.getLogger(Logger.java:117)
at com.mchange.v2.log.log4j.Log4jMLog.getMLogger(Log4jMLog.java:68)
at com.mchange.v2.log.MLog.getLogger(MLog.java:206)
at com.mchange.v2.cfg.MConfig.<clinit>(MConfig.java:45)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:171)
at com.mchange.v2.log.MLogConfig.ensureDelayedDumpToLogger(MLogConfig.java:93)
at com.mchange.v2.log.MLogConfig.logDelayedItems(MLogConfig.java:120)
at com.mchange.v2.log.MLog$1.run(MLog.java:128)
有下面三种方法未曾验证:
- 在log4j.properties中添加
apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
- 又有说法是在tomcat的/conf/catalina.properties下添加
org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
- 还有说法在tomcat的/bin/catalina.sh文件添加
-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false