1 Reply Latest reply on Jun 8, 2012 4:45 AM by sergiu_pienar

    log4j in JBoss 7

    sergiu_pienar

      I'm trying to configure log4j in JBoss 7.1.1. I've read this : https://docs.jboss.org/author/display/AS71/How+To#HowTo-HowdoIuselog4j.propertiesorlog4j.xmlinsteadofusingtheloggingsubsystemconfiguration%3F

      and it doesn't seem to work, particularily the jboss-deployment-structure.xml, as I'm getting this :

       

      08:06:36,341 ERROR [stderr] (MSC service thread 1-3) log4j:ERROR A "org.apache.log4j.xml.DOMConfigurator" object is not assignable to a "org.apache.log4j.spi.Configurator" variable.

      08:06:36,345 ERROR [stderr] (MSC service thread 1-3) log4j:ERROR The class "org.apache.log4j.spi.Configurator" was loaded by

      08:06:36,347 ERROR [stderr] (MSC service thread 1-3) log4j:ERROR [ModuleClassLoader for Module "deployment.all-dev.ear:main" from Service Module Loader] whereas object of type

      08:06:36,350 ERROR [stderr] (MSC service thread 1-3) log4j:ERROR "org.apache.log4j.xml.DOMConfigurator" was loaded by [ModuleClassLoader for Module "org.apache.log4j:main" from local module loader @d75415 (roots: C:\JBoss7\modules)].

      08:06:36,353 ERROR [stderr] (MSC service thread 1-3) log4j:ERROR Could not instantiate configurator [org.apache.log4j.xml.DOMConfigurator].

       

      I've looked for other log4j jar's that might exist in the EAR or in the WAR's but there's none ... so, why this conflict ?

       

      The app is packed as an EAR containing 3 other WAR's.

       

      Thank you .