Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 975085

Summary: Unable to remove custom logging handler
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: James Perkins <jperkins>
Component: LoggingAssignee: James Perkins <jperkins>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: cdewolf, jperkins, lcosti, myarboro, pkremens, rdickens, rsvoboda
Target Milestone: ER4   
Target Release: EAP 6.1.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
In previous versions of JBoss EAP 6, during the removal process for a custom log handler (e.g. Apache log4j), attempts were made to execute post-configuration methods after an instance was removed. This resulted in a failure to remove a custom log handler. In this release of JBoss EAP 6 changes have been made to the logging susbsystem to prevent this issue from occurring, and custom log handlers can now be removed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-16 20:30:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description James Perkins 2013-06-17 15:35:11 UTC
Description of problem:
During removal of the custom handler in Log4jCustomHandlerTestCase the following error is shown:
09:38:24,266 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 4) JBAS014612: Operation ("remove") failed - address: ([
    ("subsystem" => "logging"),
    ("custom-handler" => "customFileAppender")
]): java.lang.IllegalArgumentException: No reference found for 'org.jboss.as.logging.logmanager.Log4jAppenderHandler'
	at org.jboss.logmanager.config.AbstractPropertyConfiguration$5.validate(AbstractPropertyConfiguration.java:399) [jboss-logmanager-1.4.1.Final.jar:1.4.1.Final]
	at org.jboss.logmanager.config.AbstractPropertyConfiguration$5.validate(AbstractPropertyConfiguration.java:391) [jboss-logmanager-1.4.1.Final.jar:1.4.1.Final]
	at org.jboss.logmanager.config.LogContextConfigurationImpl.doPrepare(LogContextConfigurationImpl.java:333) [jboss-logmanager-1.4.1.Final.jar:1.4.1.Final]
	at org.jboss.logmanager.config.LogContextConfigurationImpl.prepare(LogContextConfigurationImpl.java:292) [jboss-logmanager-1.4.1.Final.jar:1.4.1.Final]
	at org.jboss.as.logging.logmanager.ConfigurationPersistence.prepare(ConfigurationPersistence.java:302) [wildfly-logging-8.0.0.Alpha2-SNAPSHOT.jar:8.0.0.Alpha2-SNAPSHOT]
	at org.jboss.as.logging.LoggingOperations$CommitOperationStepHandler.execute(LoggingOperations.java:97) [wildfly-logging-8.0.0.Alpha2-SNAPSHOT.jar:8.0.0.Alpha2-SNAPSHOT]
	at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:440) [wildfly-controller-8.0.0.Alpha2-SNAPSHOT.jar:8.0.0.Alpha2-SNAPSHOT]
	at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:322) [wildfly-controller-8.0.0.Alpha2-SNAPSHOT.jar:8.0.0.Alpha2-SNAPSHOT]
	at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:229) [wildfly-controller-8.0.0.Alpha2-SNAPSHOT.jar:8.0.0.Alpha2-SNAPSHOT]
	at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:224) [wildfly-controller-8.0.0.Alpha2-SNAPSHOT.jar:8.0.0.Alpha2-SNAPSHOT]
	at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:235) [wildfly-controller-8.0.0.Alpha2-SNAPSHOT.jar:8.0.0.Alpha2-SNAPSHOT]
	at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:124) [wildfly-controller-8.0.0.Alpha2-SNAPSHOT.jar:8.0.0.Alpha2-SNAPSHOT]
	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:148) [wildfly-controller-8.0.0.Alpha2-SNAPSHOT.jar:8.0.0.Alpha2-SNAPSHOT]
	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$300(ModelControllerClientOperationHandler.java:97) [wildfly-controller-8.0.0.Alpha2-SNAPSHOT.jar:8.0.0.Alpha2-SNAPSHOT]
	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:114) [wildfly-controller-8.0.0.Alpha2-SNAPSHOT.jar:8.0.0.Alpha2-SNAPSHOT]
	at org.jboss.as.protocol.mgmt.AbstractMessageHandler$2$1.doExecute(AbstractMessageHandler.java:296) [wildfly-protocol-8.0.0.Alpha2-SNAPSHOT.jar:8.0.0.Alpha2-SNAPSHOT]
	at org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:518) [wildfly-protocol-8.0.0.Alpha2-SNAPSHOT.jar:8.0.0.Alpha2-SNAPSHOT]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_19]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_19]
	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_19]
	at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.0.Final.jar:2.1.0.Final]

Steps to Reproduce:
1. Add a log4j appender as a custom-handler
2. Remove the custom-handler


Additional info:

The bug is actually in the logmanager. A PR has already been submitted for a fix, https://github.com/jboss-logging/jboss-logmanager/pull/19

Comment 4 Petr Kremensky 2013-07-31 06:49:39 UTC
Verified on EAP 6.1.1 ER4

Comment 5 JBoss JIRA Server 2013-08-01 19:24:29 UTC
James Perkins <jperkins> updated the status of jira WFLY-1503 to Resolved

Comment 6 JBoss JIRA Server 2013-08-01 19:24:29 UTC
James Perkins <jperkins> made a comment on jira WFLY-1503

I think WFLY-1578 should fix this. I don't think there are any other fixes required.