Log4J Appenders configured in logging subsystem don't work in EAP 6.1.0

Solution Unverified - Updated -

Issue

  • I configured a Log4J appender as a <custom-handler> in my logging subystem. It works fine the first time I start JBoss, but every time afterwards it fails:
2013-05-06 11:19:44,724 WARN  [org.jboss.as.logging] (Controller Boot Thread) JBAS011511: Replacing handler 'SYSLOG' during add operation. Either the handler type or the module name differs from the initial configuration.
 java.lang.NullPointerException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.logmanager.config.AbstractPropertyConfiguration$1.applyPostCreate(AbstractPropertyConfiguration.java:218)
    at org.jboss.logmanager.config.AbstractPropertyConfiguration$1.applyPostCreate(AbstractPropertyConfiguration.java:198)
    at org.jboss.logmanager.config.LogContextConfigurationImpl.doApplyPostCreate(LogContextConfigurationImpl.java:316)
    at org.jboss.logmanager.config.LogContextConfigurationImpl.doPrepare(LogContextConfigurationImpl.java:341)
    at org.jboss.logmanager.config.LogContextConfigurationImpl.prepare(LogContextConfigurationImpl.java:290)
  • Another form of this issue looks like this log snippet:
22:13:19,825 INFO  [org.jboss.remoting] (MSC service thread 1-8) JBoss Remoting version 3.2.16.GA-redhat-1
22:13:20,958 WARN  [org.jboss.as.logging] (Controller Boot Thread) JBAS011511: Replacing handler 'APPLMON' during add operation. Either the handler type or the module name differs from the initial configuration.
22:13:20,998 ERROR [stderr] (pool-1-thread-1) java.util.logging.ErrorManager: 1: Publication error
22:13:20,998 ERROR [stderr] (pool-1-thread-1) java.lang.IllegalStateException: JBAS011560: The handler is closed, cannot publish to a closed handler
22:13:21,000 ERROR [stderr] (pool-1-thread-1) at org.jboss.as.logging.logmanager.Log4jAppenderHandler.doPublish(Log4jAppenderHandler.java:126)
22:13:21,000 ERROR [stderr] (pool-1-thread-1) at org.jboss.logmanager.ExtHandler.publish(ExtHandler.java:76)
22:13:21,001 ERROR [stderr] (pool-1-thread-1) at org.jboss.logmanager.handlers.AsyncHandler$AsyncTask.run(AsyncHandler.java:199)
22:13:21,002 ERROR [stderr] (pool-1-thread-1) at java.lang.Thread.run(Thread.java:662)

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.1.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.