5 Replies Latest reply on Jun 9, 2009 12:58 PM by Peter Johnson

    Jboss-log4j.xml configuration

    Vinaya Tirikkovalluru Newbie


      I am using Jboss 4.2.2GA
      I am fine when I have log4j.properties file. But I want to switch to jboss-log4j.xml. I wanted to go with this because, this file can be hot deployed.

      When trying to do this, I am getting the following error

      16:50:32,765 ERROR [STDERR] log4j:ERROR A "org.jboss.logging.appender.FileAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
      16:50:32,765 ERROR [STDERR] log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
      16:50:32,765 ERROR [STDERR] log4j:ERROR [WebappClassLoader
      delegate: false
      ----------> Parent Classloader:
      ] whereas object of type
      16:50:32,765 ERROR [STDERR] log4j:ERROR "org.jboss.logging.appender.FileAppender" was loaded by [org.jboss.system.server.NoAnnotationURLClassLoader@10f6d3].
      16:50:32,765 ERROR [STDERR] log4j:ERROR Could not instantiate appender named "FILE".

      My jboss-log4j.xml is

      <!-- Rollover at midnight each day -->

      <!-- Rollover at the top of each hour
      <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>

      <!-- The default pattern: Date Priority [Category] Message\n -->

      <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n


      Is there any thing wrong with my file?

      Thanks in Advance