I m using JBoss-4.0.4.GA. I m using Log4j for logging. When i deploy my application named MsgForum.war,I get the following error:
3:20:59,828 INFO [TomcatDeployer] deploy, ctxPath=/MsgForum, warUrl=.../deploy/MsgForum.war/
3:21:03,875 ERROR [STDERR] log4j:ERROR A "org.jboss.logging.util.OnlyOnceErrorHandler" object is not assignable to a "org.apace.log4j.spi.ErrorHandler" variable.
3:21:03,875 ERROR [STDERR] log4j:ERROR The class "org.apache.log4j.spi.ErrorHandler" was loaded by
3:21:03,875 ERROR [STDERR] log4j:ERROR [WebappClassLoader
delegate: false repositories:
---------> Parent Classloader:
whereas object of type
3:21:03,875 ERROR [STDERR] log4j:ERROR "org.jboss.logging.util.OnlyOnceErrorHandler" was loaded by [org.jboss.system.server.No
3:21:03,984 ERROR [STDERR] log4j:ERROR Could not create an Appender. Reported error follows.
3:21:03,984 ERROR [STDERR] java.lang.ClassCastException: org.jboss.logging.appender.DailyRollingFileAppender
I get the above said problems. I had placed the log4j.jar of JBoss lib directory to my application's lib directory. Please tell me what could be the problems
According the the jboss wiki's FAQ for this issue:
Removing the log4j and commons-logging jars from your app should solve this problem. Seems a bit less than graceful though, since any app being deployed will need to be exploded, have their logging JARs removed, then re-zipped and deployed.