4 Replies Latest reply on Sep 4, 2007 7:28 AM by michele.curioni

    custom log4j configuration inside ear

    michele.curioni

      I'm using JBoss 4.0.2 and 4.2.0
      I wrote a Log4J Filter that I need to add to a Log4J appender.
      The Filter class is packaged inside a ear file.

      If I update the default jboss-log4j.xml in server/default/conf the Filter class is not visible.

      If I add a new log4j.xml and log4j.jar inside the ear file I could not find any way to tell JBoss to use that instead of the default one.

      Log4j.jar is still only loaded from server/default/lib and not from the ear.

      I tried to follow all the instructions in the wiki and forums, but classloading isolation does not seem to work.

      My ear file is made of ejbs and utilities jar. No webapps.

      Is this a known problem in those versions of JBoss?

      Thanks,
      Michele

        • 1. Re: custom log4j configuration inside ear
          michele.curioni

          Hi there,
          is this forum still active?

          Thanks,
          Michele

          • 2. Re: custom log4j configuration inside ear
            dimitris

            The forums is active but since participation is on a voluntarily basis there is no guarantee you'll get a timely response.

            • 3. Re: custom log4j configuration inside ear

              classloading isolation problem is a well known problem with log4j and jboss
              4.0.2 version.
              I've tried the wiki instructions to workaround this in vain. It's still a problem.
              The real problem is that jboss guys are telling that it's working. But If you search the forum, you'll see that many people have been facing to that problem. As I know, there is no real solution without removing log4j.jar in your webapps lib. But I think (like most poeple do) that this is a dirty solution.
              I'll try to apply te wiki instructions to the new jboss version (4.2.1). If it works, I'll let you know.
              Meissa

              "michele.curioni" wrote:
              I'm using JBoss 4.0.2 and 4.2.0
              I wrote a Log4J Filter that I need to add to a Log4J appender.
              The Filter class is packaged inside a ear file.

              If I update the default jboss-log4j.xml in server/default/conf the Filter class is not visible.

              If I add a new log4j.xml and log4j.jar inside the ear file I could not find any way to tell JBoss to use that instead of the default one.

              Log4j.jar is still only loaded from server/default/lib and not from the ear.

              I tried to follow all the instructions in the wiki and forums, but classloading isolation does not seem to work.

              My ear file is made of ejbs and utilities jar. No webapps.

              Is this a known problem in those versions of JBoss?

              Thanks,
              Michele


              • 4. Re: custom log4j configuration inside ear
                michele.curioni

                Hi Meissa,
                did you try with 4.2.1 ?

                thanks,
                Michele