log4j:ERROR LogMananger.repositorySelector was null

排除log4j版本问题后,仍出现此问题,解决方法:设置org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false,以下是说明:

If true, Tomcat attempts to null out any static or final fields from loaded classes when a web application is stopped as a work around for apparent garbage collection bugs and application coding errors.

There have been some issues reported with log4j when this option is true.

Applications without memory leaks using recent JVMs should operate correctly with this option set to false.

If not specified, the default value of true will be used.


http://tomcat.apache.org/tomcat-6.0-doc/config/systemprops.html

 

你可能感兴趣的:(java,log4j)