Ad

Friday 21 August 2009

log4j:WARN No appenders could be found for logger

Nowadays log4j is used as a logging service in almost every J2EE application.
Sometimes we may get the below error when we try to configure log4j to our application

log4j:WARN No appenders could be found for logger (somePackageName.someClassName)
log4j:WARN Please initialize the log4j system properly


The above error will be thrown,when classes in log4j.jar could not able to find the configuration file(log4j.properties or log4j.xml) in the application Classpath.

So make sure you put the file(log4j.properties or log4j.xml)
(1)in WEB-INF/classes directory
or
(2)in the shared application classpath which may depends on the server(Incase of weblogic it is APP-INF/classes)

No comments:

Post a Comment