3 Replies Latest reply on Apr 13, 2005 11:14 AM by Steve Ahlstrom

    Help!  Log4j properties in .war???

    Steve Ahlstrom Newbie

      Help! I've written a custom Log4J appender. My appender code is in my log file. Since Jboss 4.01 reads the log4j.xml file before my war is deployed it can't find my appender class. How do I get the system to read my log4j.properties file instead?

        • 1. Re: Help!  Log4j properties in .war???
          Steve Ahlstrom Newbie

          Let me pose the question a different way....

          I've written a customer JMS queue append for log4j.

          What do I need to do to get the appender to load either...

          1) When JBoss 4.01 loads

          2) Read and use my log4j.xml file in WEB-INF/classes

          I've followed the example in the WIKI dealing with jboss-web.xml ... now my app just throws tons of excepts when deployed

          org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (ReflectionException: Cannot find setter method setDocBase null Cause: java.lang.NoSuchMethodException: org.apache.commons.modeler.BaseModelMBean.setDocBase(java.lang.String))
          at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:383)

          There has to be a solution ... I can't believe that there isn't a way to load a custom log4j appender.

          • 2. Re: Help!  Log4j properties in .war???
            Adrian Brock Master

             


            Cannot find setter method setDocBase null Cause: java.lang.NoSuchMethodException: org.apache.commons.modeler.BaseModelMBean.setDocBase(java.lang.String))
            at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:383)


            I see no evidence of anything jms related here. I do see a message from the
            web container saying it cannot find a method (probably because you've changed the jar
            to be incompatbile with what Tomcat uses).

            • 3. Re: Help!  Log4j properties in .war???
              Steve Ahlstrom Newbie

              The problem ended up being comons-logging. Can't have the jar in my war if I'm using scoped classloading of log4j.