0 Replies Latest reply on Jun 26, 2007 8:05 PM by Tom Tackabery

    log4j error in Tomcat 6

    Tom Tackabery Newbie

      I'm seeing this NullPointer error when I shutdown Tomcat 6.0.13:

      INFO: Stopping service Catalina
      Jun 26, 2007 4:49:57 PM org.apache.catalina.core.ApplicationContext log
      INFO: SessionListener: contextDestroyed()
      Jun 26, 2007 4:49:57 PM org.apache.catalina.core.ApplicationContext log
      INFO: ContextListener: contextDestroyed()
      ContextListener: attributeRemoved('com.sun.faces.config.WebConfiguration', 'com.sun.faces.config.WebConfiguration@1aadcc6')
      16:49:57,541 INFO [SessionFactoryImpl] closing
      Failed to initalize plugin: org.jboss.logging.Log4jLoggerPlugin@c9d448
      Failed to initalize plugin: org.jboss.logging.Log4jLoggerPlugin@ba3671
      Jun 26, 2007 4:49:57 PM org.apache.coyote.http11.Http11Protocol destroy
      INFO: Stopping Coyote HTTP/1.1 on http-8080
      Exception in thread "Thread-2" java.lang.NullPointerException
       at org.apache.log4j.helpers.PatternConverter.spacePad(PatternConverter.java:98)
       at org.apache.log4j.helpers.PatternConverter.format(PatternConverter.java:71)
       at org.apache.log4j.PatternLayout.format(PatternLayout.java:495)
       at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:292)
       at org.apache.log4j.WriterAppender.append(WriterAppender.java:150)
       at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)
       at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:57)
       at org.apache.log4j.Category.callAppenders(Category.java:187)
       at org.apache.log4j.Category.forcedLog(Category.java:372)
       at org.apache.log4j.Category.log(Category.java:864)
       at org.jboss.logging.Log4jLoggerPlugin.info(Log4jLoggerPlugin.java:160)
       at org.jboss.logging.Logger.info(Logger.java:187)
       at org.jboss.kernel.plugins.bootstrap.standalone.StandaloneBootstrap$Shutdown.run(StandaloneBootstrap.java:123)


      I'm using the following log4j config file just as I found it in the JPA (tomcat pojo) example in Seam 1.3.0 ALPHA:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
      
      <!-- ===================================================================== -->
      <!-- -->
      <!-- Log4j Configuration -->
      <!-- -->
      <!-- ===================================================================== -->
      
      <!-- $Id: log4j.xml,v 1.1 2006/11/08 09:38:58 myuan Exp $ -->
      
      <!--
       | For more configuration infromation and examples see the Jakarta Log4j
       | owebsite: http://jakarta.apache.org/log4j
       -->
      
      <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
      
       <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
       <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
       <param name="Target" value="System.out"/>
      
       <layout class="org.apache.log4j.PatternLayout">
       <param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{1}] %m%n"/>
       </layout>
       </appender>
      
       <!--
       <category name="org.hibernate">
       <priority value="DEBUG"/>
       </category>
       -->
      
       <!--
       <category name="org.jboss.seam">
       <priority value="DEBUG"/>
       </category>
       -->
      
       <!--
       <category name="org.jboss.kernel">
       <priority value="DEBUG"/>
       </category>
       -->
      
       <root>
       <priority value="INFO"/>
       <appender-ref ref="CONSOLE"/>
       </root>
      
      </log4j:configuration>
      


      I'm using the exact same library set from the JPA example except the two el-*.jar libs (wouldn't run with those in place).

      The application seems to work fine, it's just the exception on shutdown makes me nervous.

      Is this an indication of trouble elsewhere? Any suggestions on how to make it go away would be very much appreciated.

      Thanks!