3 Replies Latest reply on Aug 6, 2003 3:44 AM by mikesu

    commons-logging on JBoss is not working

    rabihyazbeck

      I am porting a web application from Tomcat to JBoss.
      This application used commons-logging on top of log4j to do its logging. I didnt change anything in the logging configuration and the location of the propreties files, but it is not working.

      commons-logging.properties and log4j.properties are in app.ear/webapp.ear/WEB-INF/

      (i enven tried to change their locations to default/lib and other places and still it is not working)

      with the following entries:

      commons-logging.properties:

      org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger

      log4j.properties:

      log4j.rootLogger=DEBUG, stdout, rolling

      log4j.appender.stdout=org.apache.log4j.ConsoleAppender

      log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

      log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n

      log4j.appender.rolling=org.apache.log4j.RollingFileAppender

      log4j.appender.rolling.File=D:\\cbclog.txt

      log4j.appender.rolling.MaxFileSize=200KB

      log4j.appender.rolling.MaxBackupIndex=10

      log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
      log4j.appender.rolling.layout.ConversionPattern=%d{ABSOLUTE} - %p %c - %m%n





      Do I need to do make any changes in the configuration and/or the location of the properties files, or any other JBoss-specific configuration?

      Thank you in advance.. R

      Rabih

        • 1. Re: commons-logging on JBoss is not working
          jonlee

          Is the deployment using an exploded EAR/WAR or are they packaged in a single archive file? Just trying to determine if the packaging is the issue. Since Tomcat unpacks everything and JBoss does not, it is possible that the files cannot be found to be read. If they aren't unpacked, you might try unpacking and deploying to JBoss and see if this changes anything.

          • 2. Re: commons-logging on JBoss is not working
            rabihyazbeck

            Hi Jonlee.. the deployment is using an exploded EAR, which includes exploded WAR and JAR.. I have tried to move the preperties files to many locations with no sucess.. in case of Tomcat they were in WAR file and the properties files (log4j/commons-logging) were under WEB-INF/classes/ but now with WAR file under JBOSS where the files should be placed?.. thanks..

            • 3. Re: commons-logging on JBoss is not working
              mikesu

              I also would like to know :). Have the same problem with session bean. Logging *.properties files seem to be ignored.