title: log4j:ERROR Attempted to append to closed appender named
body: <p>We have about 19 applications in our weblogic 8.1 server. Each application is an .Ear application with a few ejbs, mdb etc., Each application has a log4j properties defined in a .properties file somewhere in the filesystem.  </p>
  
  <p>We keep getting this error(below) in the server logs for all the applications. This exception is not caught in the application, the flow of the application does not stop, but we miss a log statement or two when this exception occurs.</p>
  
  <pre><code>log4j:ERROR Attempted to append to closed appender named
  </code></pre>
  
  <p>Note: I've looked up in the internet, i've not seen duplicate log4j.jar files anywhere in the system. I can post the .properties files if you need. </p>
  
  <p>EDIT: Including a couple of log4j properties. These property files are same for all the other applications as well. </p>
  
  <p><strong>1st LOG file.</strong></p>
  
  <pre><code> # Define the root logger with appender file
    log=.//SI_AppLogs
    log4j.rootLogger=WARN, SomeApp
  
    log4j.logger.SomeAppLoggers = INFO, SomeApp     
  
   # Define the file appender
    log4j.appender.SomeApp=org.apache.log4j.DailyRollingFileAppender
    log4j.appender.SomeApp.File=${log}/CPEPortBasedAuthorization.log
    log4j.appender.SomeApp.DatePattern='.'yyyy-MM-dd
    log4j.appender.SomeApp.Append=true
  
    # Define the layout for file appender
    log4j.appender.SomeApp.layout=org.apache.log4j.PatternLayout
    log4j.appender.SomeApp.layout.conversionPattern=%d %-5r %-5p [%c] (%t:%x) %m%n
  
    log4j.additivity.org.apache=false
    log4j.additivity.SomeAppLoggers = false 
  </code></pre>
  
  <p><strong>2nd Log file</strong></p>
  
  <pre><code> # Define the root logger with appender file
  
  
  log=.//SI_AppLogs
    log4j.rootLogger=WARN, AnotherApp
  
    log4j.logger.AnotherAppLoggers = INFO, AnotherApp
  
    # Define the file appender
    log4j.appender.AnotherApp=org.apache.log4j.DailyRollingFileAppender
    log4j.appender.AnotherApp.File=${log}/CPEPortBasedAuthorization.log
    log4j.appender.AnotherApp.DatePattern='.'yyyy-MM-dd
    log4j.appender.AnotherApp.Append=true
  
    # Define the layout for file appender
    log4j.appender.AnotherApp.layout=org.apache.log4j.PatternLayout
    log4j.appender.AnotherApp.layout.conversionPattern=%d %-5r %-5p [%c] (%t:%x) %m%n
  
    log4j.additivity.org.apache=false
    log4j.additivity.AnotherAppLoggers = false 
  </code></pre>
  
  <p>Update: </p>
  
  <p>I've not seen duplicate log4j.jars in the class path. I've ran the following code and verified. </p>
  
  <pre><code>String classpath = System.getProperty("java.class.path");
  </code></pre>
  
  <p>I've not seen any two log4j.properties files have the same Appender defined. Verified it by search the whole weblogic deploy directory. </p>