2 Replies Latest reply on Mar 22, 2012 3:14 AM by Sebastian Bayerlein

    JBoss 7.1.1: log4j.xml in EAR/lib ignored during deployment

    Sebastian Bayerlein Newbie



      I have an EAR containing 300 EJB's and one log4j.xml, located in the lib directory of the EAR.

      In EAR/META-INF/ I included the jboss-deployment-structure.xml which excludes the jboss log4j, to use the apllication specific log4j.jar in the lib folder of the EAR:


      <?xml version="1.0" encoding="UTF-8"?>


                 <!-- Make sub deployments isolated by default, so they cannot see each others classes without a Class-Path entry -->




             <module name="org.apache.log4j" />





      When calling an EJB to log the output, there is only the following warning in the console log:


      12:41:31,353 ERROR [stderr] (EJB default - 1) log4j:WARN No appenders could be found for logger (com.xxx.DBAccesor).

      12:41:31,354 ERROR [stderr] (EJB default - 1) log4j:WARN Please initialize the log4j system properly.


      The files, configured as logfiles in the log4j appenders are also not created:


      <appender name="ID_FILELOGGER" class="org.apache.log4j.DailyRollingFileAppender">

                <param name="File" value="${jboss.server.log.dir}/ejb.log"/>

                <param name="Append" value="true"/>

                <param name="DatePattern" value="'.'yyyy-MM-dd"/>

                <layout class="org.apache.log4j.PatternLayout">

                          <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS}\t%p\t%x\t%c{1}\t%m%n"/>




      ejb.log is never written.


      I also tried to get log4j working with the examples from https://community.jboss.org/message/622668. In this case I also can not find any logfile.


      Has someone a solution for this problem?


      Best regards