Search code examples
loggingjbossclassloaderjboss6.x

JBoss6 Classloading logging


We are having some class loading issues when deploying an application to JBoss AS 6.0.0 Final. Is there any logging that can be enabled within JBoss to see when classes are being loaded and by which classloader?


Solution

  • I think that you can try to monitor classes in package org.jboss.classloader. Just add such lines to your jboss-logging.xml file (you can find that file in deploy directory):

       <periodic-rotating-file-handler
             file-name="${jboss.server.log.dir}/cl.log"
             name="CL"
             autoflush="true"
             append="true"
             suffix=".yyyy-MM-dd"> 
    
          <error-manager>
             <only-once/>
          </error-manager>
    
          <formatter>
             <pattern-formatter pattern="%d %-5p [%c] (%t) %s%E%n"/>
          </formatter>
       </periodic-rotating-file-handler>
    
       <logger category="org.jboss.classloader">
            <level name="TRACE"/>
          <handlers>
             <handler-ref name="CL"/>
          </handlers>
       </logger>
    

    After that you can find some information about class loading in the log/cl.log file.

    More info can be found in that article: EnableClassloaderLogging