wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes log4j messages in JBoss log Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "log4j messages in JBoss log" Watch "log4j messages in JBoss log" New topic

log4j messages in JBoss log

Drake Almonto

Joined: Apr 29, 2005
Posts: 16

I am receiving these error messages in the log file during deployment of my application in JBoss. The messages started to appear after I add a log4j jar file to the lib directory in WEB-INF. Can anyone help?

2008-05-14 12:42:17,240 ERROR [STDERR] log4j:ERROR A "org.jboss.logging.appender.FileAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
2008-05-14 12:42:17,240 ERROR [STDERR] log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
2008-05-14 12:42:17,240 ERROR [STDERR] log4j:ERROR [WebappClassLoader
delegate: false
----------> Parent Classloader:
] whereas object of type
2008-05-14 12:42:17,240 ERROR [STDERR] log4j:ERROR "org.jboss.logging.appender.FileAppender" was loaded by [org.jboss.system.server.NoAnnotationURLClassLoader@1e4457d].
2008-05-14 12:42:17,240 ERROR [STDERR] log4j:ERROR Could not instantiate appender named "FILE".
Peter Johnson

Joined: May 14, 2008
Posts: 5812

Remove the log4j.jar file from WEB-INF/lib. JBossAS already has that file, so you don't need it. And as you found it causes classloader issues if you have your own copy.

JBoss In Action
I agree. Here's the link: http://aspose.com/file-tools
subject: log4j messages in JBoss log
Similar Threads
setting up log4J for application
JBoss 4.2.0 and Oracle 10g Configuration Issue with new DataSource
How to filter out application specific log from server.log
Jar hell concerning log4j
Error when I deploy a war in Tomcat / jboss