3 Replies Latest reply on May 15, 2004 12:38 AM by juha

    Problem Verifying WAR Using Log4J on 3.2.3

    hunterhillegas

      Since trying 3.2.3, our WAR files that use Log4J don't deploy.

      I get verifier errors like this:

      15:20:52,954 ERROR [Engine] ----- Root Cause -----
      java.lang.VerifyError: (class: org/apache/log4j/Category, method: getRoot signature: ()Lorg/apache/log4j/Category;) Wrong return type in function
      at startupServlet.init(Unknown Source)

      Huh?

      The code we're using to initialize log4j is:
      //logging
      cat = Category.getInstance(siteConfig.getClientName() + ": Name");

      This has worked fine in 3.0.x and 3.x releases...

      Any ideas what's going on?

        • 1. Re: Problem Verifying WAR Using Log4J on 3.2.3
          starksm64

          There is a conflict with the loaded log4j.jar version coming from somewhere. If your bundling your own log4j.jar in the web and need this version, then you have to enable class loader overrides using a jboss-web.xml setup like:

          <jboss-web>
           <class-loading java2ClassLoadingCompliance="false">
           <loader-repository>
           jboss.test:war=log4j113.war
           <loader-repository-config>
           java2ParentDelegation=false
           </loader-repository-config>
           </loader-repository>
           </class-loading>
          </jboss-web>
          



          • 2. Re: Problem Verifying WAR Using Log4J on 3.2.3
            mlueck

            Hello Scott,

            I also experienced a "java.lang.VerifyError " and the reason seems to be that there are two Jar's with different versions in two different webapps. What I don't understand in your example-configuration is this line:

            >
            > jboss.test:war=log4j113.war
            >

            Is this a symbolic name or do I have to use the name of my war-file here?

            Greetings from Germany
            Matthias Lueck

            • 3. Re: Problem Verifying WAR Using Log4J on 3.2.3

              You can use any object name.