1 Reply Latest reply on Aug 18, 2009 11:44 AM by Peter Johnson

    Log4j Error

    tmc testing Newbie

      Hi,

      I'm trying to deploy a WAR file with it's own log4j.properties and log4j.jar. I have tried using the jboss-web.xml in the WEB-INF directory as shown below:

      <?xml version="1.0" encoding="UTF-8" ?>
      <!DOCTYPE jboss-web PUBLIC
       "-//JBoss//DTD Web Application 4.2//EN"
       "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd">
      <jboss-web>
       <class-loading java2ClassLoadingCompliance="false">
       <loader-repository>
       rfims:loader=rfims.war
       <loader-repository-config>
       java2ParentDelegation=false
       </loader-repository-config>
       </loader-repository>
       </class-loading>
      </jboss-web>


      But I keep getting the following error:

      15:55:50,865 ERROR [STDERR] log4j:ERROR A "org.jboss.logging.appender.FileAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
      15:55:50,865 ERROR [STDERR] log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
      15:55:50,865 ERROR [STDERR] log4j:ERROR [org.jboss.mx.loading.UnifiedClassLoader3@85097d{ url=file:/D:/jboss-4.2.2.GA/jboss-4.2.2.GA/server/default/tmp/deploy/tmp30919rfims-exp.war/ ,addedOrder=43}] whereas object of type
      15:55:50,865 ERROR [STDERR] log4j:ERROR "org.jboss.logging.appender.FileAppender" was loaded by [org.jboss.system.server.NoAnnotationURLClassLoader@ab95e6].
      15:55:50,865 ERROR [STDERR] log4j:ERROR Could not instantiate appender named "FILE".


      Can anyone help? Thanks.

      BTW using jboss-4.2.2.GA