tags:

views:

58

answers:

1

Hi,

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

+3  A: 

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).

Manrico Corazzi
Or log4j.properties
Dev er dev
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 :-)
Manrico Corazzi