5 Replies Latest reply on Nov 24, 2005 5:10 PM by erikengerd2

    Log4J conflict ?

    talkinjive Newbie

      Hi,

      I deploy a .ear. I can't load log4j.properties (see below) with my initialisation servlet (I didn't have this pb with JBoss 3.2.3).

      I usually comment the root configuration because it used to do conflict with JBoss root (loop). But from now it doesn't seem to matter ! No way to use the .ear Log4J pattern. The logs use the JBoss log4j.xml pattern by default.

      What may be this ClassLoader error (see below) ? What is the cure ?

      Thank you.
      TalkinJive.

      My log4J.properties _____________________________________
      # root is already initiated in JBoss or XDoclet by log4j.xml ?
      log4j.rootLogger = ALL, stdout

      # stdout is set to be a ConsoleAppender.
      log4j.appender.stdout=org.apache.log4j.ConsoleAppender

      # stdout uses PatternLayout.
      log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
      log4j.appender.stdout.layout.ConversionPattern=*** %-5p *** %c - %m%n

      #######################################################################
      # serv package
      log4j.logger.serv = INFO, serv
      log4j.additivity.serv = false

      # serv is set to be a ConsoleAppender.
      log4j.appender.serv = org.apache.log4j.ConsoleAppender

      # serv uses PatternLayout.
      log4j.appender.serv.layout=org.apache.log4j.PatternLayout
      log4j.appender.serv.layout.ConversionPattern=*** %-5p *** %c - %m%n
      ________________________________________________________

      ERROR MESSAGE_________________________________________
      2005-06-09 15:21:29,192 INFO [STDOUT] log4j:ERROR [WebappClassLoader
      delegate: false
      repositories:
      /WEB-INF/classes/
      ----------> Parent Classloader:
      java.net.FactoryURLClassLoader@16becfe
      ] whereas object of type
      2005-06-09 15:21:29,192 INFO [STDOUT] log4j:ERROR "org.jboss.logging.util.OnlyOnceErrorHandler" was loaded by [org.jboss.system.server.NoAnnotationURLClassLoader@1833955].
      2005-06-09 15:21:29,255 INFO [STDOUT] log4j:ERROR Could not create an Appender. Reported error follows.
      2005-06-09 15:21:29,255 INFO [STDOUT] java.lang.ClassCastException: org.jboss.logging.appender.DailyRollingFileAppender
      2005-06-09 15:21:29,271 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:165)
      2005-06-09 15:21:29,271 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:140)
      2005-06-09 15:21:29,271 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:153)
      2005-06-09 15:21:29,271 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:415)
      2005-06-09 15:21:29,271 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:384)
      2005-06-09 15:21:29,271 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:783)
      2005-06-09 15:21:29,271 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:666)
      2005-06-09 15:21:29,271 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:616)
      2005-06-09 15:21:29,271 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:602)
      2005-06-09 15:21:29,271 INFO [STDOUT] at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:460)
      2005-06-09 15:21:29,271 INFO [STDOUT] at org.apache.log4j.LogManager.(LogManager.java:113)
      2005-06-09 15:21:29,271 INFO [STDOUT] at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:315)
      2005-06-09 15:21:29,271 INFO [STDOUT] at serv.Log4jInit.init(Unknown Source)
      ...
      ____________________________________________________________

        • 1. Re: Log4J conflict ?
          Darran Lofthouse Master

           

          "talkinjive" wrote:

          I didn't have this pb with JBoss 3.2.3


          Which version of JBoss are you having the problem with now?

          • 2. Re: Log4J conflict ?
            talkinjive Newbie

            Hi.

            I use now JBoss 4.

            • 3. Re: Log4J conflict ?
              Newbie

              Very similar issue here with LOG4J - latest JBOSS 4.0.2 release, ear deployment throws log4j errors.

              Please point me to a fix.

              Thanks
              /Ray


              21:30:31,407 INFO [STDOUT] log4j:ERROR A "org.jboss.logging.util.OnlyOnceErrorHandler" object is not assignable to a "o
              rg.apache.log4j.spi.ErrorHandler" variable.
              21:30:31,407 INFO [STDOUT] log4j:ERROR The class "org.apache.log4j.spi.ErrorHandler" was loaded by
              21:30:31,407 INFO [STDOUT] log4j:ERROR [WebappClassLoader
              delegate: false
              repositories:
              /WEB-INF/classes/
              ----------> Parent Classloader:
              java.net.FactoryURLClassLoader@1b68d78
              ] whereas object of type
              21:30:31,407 INFO [STDOUT] log4j:ERROR "org.jboss.logging.util.OnlyOnceErrorHandler" was loaded by [org.jboss.system.se
              rver.NoAnnotationURLClassLoader@1833955].
              21:30:31,438 INFO [STDOUT] log4j:ERROR Could not create an Appender. Reported error follows.
              21:30:31,438 INFO [STDOUT] java.lang.ClassCastException: org.jboss.logging.appender.DailyRollingFileAppender
              21:30:31,438 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:165)
              21:30:31,438 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:140)
              21:30:31,438 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:153
              )
              21:30:31,438 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.jav
              a:415)
              21:30:31,438 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:384)
              21:30:31,438 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:783)
              21:30:31,438 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:666)
              21:30:31,438 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:616)
              21:30:31,438 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:602)
              21:30:31,438 INFO [STDOUT] at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:460)

              21:30:31,438 INFO [STDOUT] at org.apache.log4j.LogManager.(LogManager.java:113)
              21:30:31,438 INFO [STDOUT] at org.apache.log4j.Category.getInstance(Category.java:530)
              21:30:31,438 INFO [STDOUT] at com.my.framework.util.Log4jSetupServlet.(Log4jSetupServlet.java:27)
              21:30:31,438 INFO [STDOUT] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              21:30:31,438 INFO [STDOUT] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.j
              ava:39)
              21:30:31,438 INFO [STDOUT] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccess
              orImpl.java:27)
              21:30:31,438 INFO [STDOUT] at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
              21:30:31,438 INFO [STDOUT] at java.lang.Class.newInstance0(Class.java:350)
              21:30:31,438 INFO [STDOUT] at java.lang.Class.newInstance(Class.java:303)
              21:30:31,438 INFO [STDOUT] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
              21:30:31,438 INFO [STDOUT] at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
              21:30:31,438 INFO [STDOUT] at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3857)
              21:30:31,438 INFO [STDOUT] at org.apache.catalina.core.StandardContext.start(StandardContext.java:4118)
              21:30:31,438 INFO [STDOUT] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
              21:30:31,438 INFO [STDOUT] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
              21:30:31,438 INFO [STDOUT] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
              21:30:31,438 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              21:30:31,438 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              21:30:31,438 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              21:30:31,438 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
              21:30:31,438 INFO [STDOUT] at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
              21:30:31,438 INFO [STDOUT] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
              21:30:31,438 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
              21:30:31,438 INFO [STDOUT] at org.apache.catalina.core.StandardContext.init(StandardContext.java:5005)
              21:30:31,453 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              21:30:31,453 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              21:30:31,453 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              21:30:31,453 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
              21:30:31,453 INFO [STDOUT] at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
              21:30:31,453 INFO [STDOUT] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
              21:30:31,453 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
              21:30:31,453 INFO [STDOUT] at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:274
              )
              21:30:31,453 INFO [STDOUT] at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:91)
              21:30:31,453 INFO [STDOUT] at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:357)
              21:30:31,453 INFO [STDOUT] at org.jboss.web.WebModule.startModule(WebModule.java:68)
              21:30:31,453 INFO [STDOUT] at org.jboss.web.WebModule.startService(WebModule.java:46)
              21:30:31,453 INFO [STDOUT] at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)

              21:30:31,453 INFO [STDOUT] at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:
              222)
              21:30:31,453 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
              21:30:31,453 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              21:30:31,485 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
              21:30:31,485 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
              21:30:31,485 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
              21:30:31,485 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
              21:30:31,485 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
              21:30:31,485 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
              21:30:31,485 INFO [STDOUT] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:897)
              21:30:31,485 INFO [STDOUT] at $Proxy0.start(Unknown Source)
              21:30:31,485 INFO [STDOUT] at org.jboss.system.ServiceController.start(ServiceController.java:418)
              21:30:31,485 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
              21:30:31,485 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              21:30:31,485 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
              21:30:31,485 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
              21:30:31,485 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
              21:30:31,485 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
              21:30:31,485 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
              21:30:31,485 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
              21:30:31,485 INFO [STDOUT] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
              21:30:31,485 INFO [STDOUT] at $Proxy28.start(Unknown Source)
              21:30:31,485 INFO [STDOUT] at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:394)
              21:30:31,485 INFO [STDOUT] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
              21:30:31,485 INFO [STDOUT] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:956)
              21:30:31,485 INFO [STDOUT] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
              21:30:31,485 INFO [STDOUT] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
              21:30:31,485 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
              21:30:31,485 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              21:30:31,485 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
              21:30:31,485 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
              21:30:31,485 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
              21:30:31,485 INFO [STDOUT] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
              21:30:31,485 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
              21:30:31,485 INFO [STDOUT] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInt
              erceptor.java:127)
              21:30:31,485 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
              21:30:31,485 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
              21:30:31,485 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
              21:30:31,485 INFO [STDOUT] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
              21:30:31,485 INFO [STDOUT] at $Proxy8.deploy(Unknown Source)
              21:30:31,485 INFO [STDOUT] at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:32
              5)
              21:30:31,485 INFO [STDOUT] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:501)

              21:30:31,485 INFO [STDOUT] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractD
              eploymentScanner.java:204)
              21:30:31,485 INFO [STDOUT] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDep
              loymentScanner.java:215)
              21:30:31,516 INFO [STDOUT] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDepl
              oymentScanner.java:194)
              21:30:31,516 INFO [STDOUT] log4j:ERROR Could not parse input source [org.xml.sax.InputSource@16c1bce].
              21:30:31,516 INFO [STDOUT] java.lang.NullPointerException
              21:30:31,516 INFO [STDOUT] at java.util.Hashtable.put(Hashtable.java:396)
              21:30:31,516 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:141)
              21:30:31,516 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:153
              )
              21:30:31,516 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.jav
              a:415)
              21:30:31,516 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:384)
              21:30:31,516 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:783)
              21:30:31,516 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:666)
              21:30:31,516 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:616)
              21:30:31,516 INFO [STDOUT] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:602)
              21:30:31,516 INFO [STDOUT] at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:460)

              21:30:31,516 INFO [STDOUT] at org.apache.log4j.LogManager.(LogManager.java:113)
              21:30:31,516 INFO [STDOUT] at org.apache.log4j.Category.getInstance(Category.java:530)
              21:30:31,516 INFO [STDOUT] at com.my.framework.util.Log4jSetupServlet.(Log4jSetupServlet.java:27)
              21:30:31,516 INFO [STDOUT] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              21:30:31,516 INFO [STDOUT] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.j
              ava:39)
              21:30:31,516 INFO [STDOUT] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccess
              orImpl.java:27)
              21:30:31,516 INFO [STDOUT] at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
              21:30:31,516 INFO [STDOUT] at java.lang.Class.newInstance0(Class.java:350)
              21:30:31,516 INFO [STDOUT] at java.lang.Class.newInstance(Class.java:303)
              21:30:31,516 INFO [STDOUT] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
              21:30:31,516 INFO [STDOUT] at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
              21:30:31,516 INFO [STDOUT] at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3857)
              21:30:31,516 INFO [STDOUT] at org.apache.catalina.core.StandardContext.start(StandardContext.java:4118)
              21:30:31,547 INFO [STDOUT] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
              21:30:31,563 INFO [STDOUT] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
              21:30:31,563 INFO [STDOUT] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
              21:30:31,563 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              21:30:31,563 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              21:30:31,563 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              21:30:31,563 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
              21:30:31,563 INFO [STDOUT] at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
              21:30:31,563 INFO [STDOUT] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
              21:30:31,563 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
              21:30:31,563 INFO [STDOUT] at org.apache.catalina.core.StandardContext.init(StandardContext.java:5005)
              21:30:31,563 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              21:30:31,563 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              21:30:31,563 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              21:30:31,563 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
              21:30:31,563 INFO [STDOUT] at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
              21:30:31,563 INFO [STDOUT] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
              21:30:31,563 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
              21:30:31,563 INFO [STDOUT] at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:274
              )
              21:30:31,563 INFO [STDOUT] at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:91)
              21:30:31,563 INFO [STDOUT] at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:357)
              21:30:31,563 INFO [STDOUT] at org.jboss.web.WebModule.startModule(WebModule.java:68)
              21:30:31,563 INFO [STDOUT] at org.jboss.web.WebModule.startService(WebModule.java:46)
              21:30:31,563 INFO [STDOUT] at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)

              21:30:31,563 INFO [STDOUT] at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:
              222)
              21:30:31,563 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
              21:30:31,563 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              21:30:31,563 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
              21:30:31,563 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
              21:30:31,563 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
              21:30:31,563 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
              21:30:31,563 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
              21:30:31,563 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
              21:30:31,563 INFO [STDOUT] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:897)
              21:30:31,563 INFO [STDOUT] at $Proxy0.start(Unknown Source)
              21:30:31,563 INFO [STDOUT] at org.jboss.system.ServiceController.start(ServiceController.java:418)
              21:30:31,563 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
              21:30:31,563 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              21:30:31,563 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
              21:30:31,563 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
              21:30:31,563 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
              21:30:31,563 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
              21:30:31,563 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
              21:30:31,563 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
              21:30:31,563 INFO [STDOUT] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
              21:30:31,563 INFO [STDOUT] at $Proxy28.start(Unknown Source)
              21:30:31,563 INFO [STDOUT] at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:394)
              21:30:31,563 INFO [STDOUT] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
              21:30:31,563 INFO [STDOUT] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:956)
              21:30:31,563 INFO [STDOUT] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
              21:30:31,563 INFO [STDOUT] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
              21:30:31,563 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
              21:30:31,563 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              21:30:31,594 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
              21:30:31,594 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
              21:30:31,594 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
              21:30:31,594 INFO [STDOUT] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
              21:30:31,594 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
              21:30:31,594 INFO [STDOUT] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInt
              erceptor.java:127)
              21:30:31,594 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
              21:30:31,594 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
              21:30:31,594 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
              21:30:31,594 INFO [STDOUT] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
              21:30:31,594 INFO [STDOUT] at $Proxy8.deploy(Unknown Source)
              21:30:31,594 INFO [STDOUT] at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:32
              5)
              21:30:31,594 INFO [STDOUT] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:501)

              21:30:31,594 INFO [STDOUT] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractD
              eploymentScanner.java:204)
              21:30:31,594 INFO [STDOUT] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDep
              loymentScanner.java:215)
              21:30:31,594 INFO [STDOUT] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDepl
              oymentScanner.java:194)
              21:30:31,594 INFO [STDOUT] log4j: Threshold ="null".
              21:30:31,594 INFO [STDOUT] log4j: Level value for root is [INFO].
              21:30:31,594 INFO [STDOUT] log4j: root level set to INFO
              21:30:31,594 INFO [STDOUT] log4j: Class name: [org.apache.log4j.AsyncAppender]
              21:30:31,594 INFO [STDOUT] log4j: Attaching appender named [ROOT_FILE_SYNC] to appender named [ROOT_ASYNC].
              21:30:31,594 INFO [STDOUT] log4j: Class name: [org.apache.log4j.RollingFileAppender]
              21:30:31,610 INFO [STDOUT] log4j: Setting property [file] to [/tmp/doculine.log].
              21:30:31,610 INFO [STDOUT] log4j: Setting property [append] to [true].
              21:30:31,610 INFO [STDOUT] log4j: Setting property [maxFileSize] to [100KB].
              21:30:31,610 INFO [STDOUT] log4j: Setting property [maxBackupIndex] to [1].
              21:30:31,610 INFO [STDOUT] log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
              21:30:31,610 INFO [STDOUT] log4j: Setting property [conversionPattern] to [%d %-5p [%c] %m%n].
              21:30:31,610 INFO [STDOUT] log4j: setFile called: /tmp/doculine.log, true
              21:30:31,610 INFO [STDOUT] log4j: setFile ended
              21:30:31,610 INFO [STDOUT] log4j: Adding appender named [ROOT_ASYNC] to category [root].
              21:30:31,672 INFO [EARDeployer] Started J2EE application: file:/C:/jboss-4.0.2/server/default/deploy/doculine.ear

              • 4. Re: Log4J conflict ?
                erikengerd2 Newbie

                I have a similar problem which occurs every time I (re)deploy my webapp.
                Is the problem solved yet? It is a bit annoying since it is difficult to see from the logs whether the exception is (just) the logging exception or indicates a serious deployment problem .

                Cheers
                Erik

                • 5. Re: Log4J conflict ?
                  erikengerd2 Newbie

                  Hi,


                  Just solved it. It turns out that I had log4j as part of the web archive itself (in WEB-INF/lib). This resulted in a conflict because apparently two version of log4j are loaded in memory and casting between these two versions will not work because they were independently loaded.

                  Removing log4j from WEB-INF/lib solved the problem.

                  Cheers
                  Erik