2 Replies Latest reply on Apr 30, 2004 7:55 AM by vinodnair

    multile Log4j version

    vinodnair

      Hello,
      I am using log4j 1.1.3 for logging the application and i have deployed the application (ear) on JBoss 3.2.3 ..on initiating the logger it gives methe following error

      org.apache.jasper.JasperException: org.apache.log4j.Category.exists(Ljava/lang/String;)Lorg/apache/log4j/Category;

      I have tried a couple of options so that my version of the log4j is picked up by the server.
      1. I tried putting the log4j in the WEB-INF/Lib folder while building the ear
      2. I exploded the log4j.jar package and put it below /WEB-INF/classes folder while building the ear..


      Unfortunately none of them works ..Can anybody suggest me how can i do this or it's not possible to have it this way (which i don't thik is correct)

      Thanks in advance

      Regards
      Vinod Nair

        • 1. Re: multile Log4j version
          starksm64

          There is an example of just this scenario in the testsuite. It uses a scoped loader configuration in the war WEB-INF/jboss-web.xml descriptor to load from the war WEB-INF/lib directory before the server's classes:

          <?xml version='1.0' encoding='UTF-8' ?>
          
          <!DOCTYPE jboss-web
           PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN"
           "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
          
          <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: multile Log4j version
            vinodnair

            Thanks a lot Scott.. I tried this but gave an error which said class loader configuration need to be done at the root level..i went through the advanced documentation and found this and removed the class loader entry in the jboss-web.xml and put the following in the jboss-app.xml
            <?xml version="1.0" encoding="UTF-8"?>
            <jboss-app>
            <loader-repository>some.dot.com:loader=sca.ear</loader-repository>
            </jboss-app>

            and it worked fine. Going ahead in configuration ..we are using xerces for XML uploads and SOAP message verification. We are using the SAX parser. As JBoss makes use of default crimon.jar i started the server with --jaxp=xerces but still my XML upload is giving an error

            Feature: http://apache.org/xml/features/validation/schema

            Any clue in this regard with be highly helpful...Thanks once again

            Regards
            Vinod Nair