1 Reply Latest reply on Dec 21, 2005 9:57 AM by willng

    jar in webapp lib(iBatis related) is log to conf/server.log

    willng

      I use JBoss4
      delpoy a XXX.war and the webapp has it own log4j.xml
      all my self-developed class can successfully write to the log file through my log4j.xml
      but the log in the WEB-INF/lib/xxxx.jar file of iBatis is written to the server.log
      I search in web and find that this is related to the class loading issue.
      anyone can tell me how to config the jboss so that the *.jar in my webapp lib can use my self log4j.xml as logging config.

      Thanks in advance

        • 1. Re: jar in webapp lib(iBatis related) is log to conf/server.
          willng

          remind that I use the latest version JBoss 4.0.3 SP1
          it use tomcat for delpoy webapp
          is it valid to use the below method that I find from
          http://wiki.jboss.org/wiki/Wiki.jsp?page=Logging

          Drop log4j.jar in your myapp.war/WEB-INF. Make the change in jboss-web.xml for class-loading, as shown in the section above. In this case, myapp.war/WEB-INF/jboss-web.xml looks like this:
          <jboss-web>
          <class-loading java2ClassLoadingCompliance="false">
          <loader-repository>
          myapp:loader=myapp.war
          <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
          </loader-repository>
          </class-loading>
          </jboss-web>