2 Replies Latest reply on Apr 5, 2006 12:25 PM by ovidiu.feodorov

    log4j error

    mwelss

      I use jboss 4.0.3SP1 with jboss-messaging-1.0.0GA and EJB3.0_PFD_RC4

      I used the ant script to create a messaging server config

      On the first try to put something into a queue, the following error occurs and nothing arrives at the destination Message-Driven-Bean


      10:13:02,976 INFO [STDOUT] log4j:ERROR A "org.apache.log4j.xml.DOMConfigurator" object is not assignable to a "org.apache.log4j.spi.Configurator" variable.
      10:13:02,977 INFO [STDOUT] log4j:ERROR The class "org.apache.log4j.spi.Configurator" was loaded by
      10:13:02,977 INFO [STDOUT] log4j:ERROR [org.jboss.mx.loading.UnifiedClassLoader3@9e8c34{ url=file:/home/mw/jboss-jms/server/all/deploy/jboss-messaging.sar/ ,addedOrder=11}] whereas object of type
      10:13:02,977 INFO [STDOUT] log4j:ERROR "org.apache.log4j.xml.DOMConfigurator" was loaded by [org.jboss.mx.loading.UnifiedClassLoader3@c5495e{ url=file:/home/mw/jboss-jms/server/all/tmp/deploy/tmp49924jboss-service.xml ,addedOrder=2}].
      10:13:02,978 INFO [STDOUT] log4j:ERROR Could not instantiate configurator [org.apache.log4j.xml.DOMConfigurator].
      10:13:03,080 INFO [STDOUT] log4j:WARN No appenders could be found for logger (org.jboss.serial.classmetamodel.FieldsManager).
      10:13:03,081 INFO [STDOUT] log4j:WARN Please initialize the log4j system properly.


        • 1. Re: log4j error
          ovidiu.feodorov

          Thank you for trying Messaging.


          The problem you noticed has a very simple fix: shutdown the "messaging" JBoss instance, delete the "log4j" directory from $JBOSS_HOME/server/messaging/deploy/jboss-messaging.sar/org/apache and re-start JBoss.

          This is the explanation for the problem: when used with JBoss 4.x, Messaging is deployed in its own classloading domain. This is necessary in order to take advantage of the latest features in Remoting and AOP, not currently available in JBoss 4.x. For that, we bundle the libraries Messaging uses and deploy everything in a separated classoading domain. log4j shouldn't be there. Removing it from the scoped deployment and using the one from $JBOSS_HOME/server/messaging/lib fixes the problem.

          I will modify the release scripts to produce a SAR that doesn't include log4j and any other unnecessary library. The real issue, to which I need to answer, is why our tests did not catch the problem before release.


          • 2. Re: log4j error
            ovidiu.feodorov