Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

log4j:ERROR with Tomcat 6

I programmed a Web Application with Java EE. I am using log4j and Tomcat 6.0.28. When I am starting my app at tomcat following error message appears every 3 seconds at my console:

log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.

Has somebody an idea what that means? Is there maybe a problem with log4j.xml? I can post more code/configfiles if nessecary.

The application works, but I am a little bit worried. Thank you...

like image 922
Sven Avatar asked Aug 23 '10 11:08

Sven


2 Answers

It's a log4j 1.2.15 bug with Tomcat. Update to version 1.2.17 or change to log4j 2 and the error message will be gone.

like image 62
Federico Pugnali Avatar answered Sep 29 '22 10:09

Federico Pugnali


edit the catalina properties

CATALINA_OPTS=-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false

like image 45
Ibo Avatar answered Sep 29 '22 12:09

Ibo