0

I am trying to deploy my application in Tomcat.

Getting following execption

log4j:WARN No appenders could be found for logger (org.apache.commons.digester.D
igester.sax).
log4j:WARN Please initialize the log4j system properly.

But the same war is working fine in Jboss

Please help

1 Answer 1

3

These warnings should not prevent your application from working; it's just log4j which complains that it can't find its configuration file.

Most likely in Jboss there's a log4j.properties or log4j.xml in the app server classpath which log4j automatically loads.

If you want to enable logging you have to drop a log4j.xml configuration file in your classpath (the /webapps/appname/WEB-INF/classes directory, for example, or common/classes) including a ROOT category, or org.apache.commons.digester).

Sign up to request clarification or add additional context in comments.

1 Comment

Even though I hate XML with a passion, in this particular case I found this format a tad simpler to read and tweak... but yes, log4.properties will do, of course :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.