Bug 969530

Summary: ClassCastException when JBoss LogManager is initialized before the logging subsystem expects
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Kyle Lape <klape>
Component: LoggingAssignee: James Perkins <jperkins>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: cdewolf, jlee, jlivings, jperkins, lcosti, mmillson, pkremens, pyadav, rdickens
Target Milestone: ER1   
Target Release: EAP 6.1.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
If the JBoss LogManager was added to the boot classpath, for example for custom Java agents (e.g. Introscope or JMX agent), the JBoss LogManager would be bootstrapped using the default configurator, rather than using the logging subsystem's own configurator. As the logging subsystem assumed that its own configurator would be used, this resulted in the JBoss EAP 6 failing to start, displaying the following error: ---- ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 5) JBAS014612: Operation ("add") failed - address: ([ ("subsystem" => "logging"), ("console-handler" => "CONSOLE") ]): java.lang.ClassCastException: org.jboss.logmanager.PropertyConfigurator cannot be cast to org.jboss.as.logging.logmanager.ConfigurationPersistence ... ---- This issue has been fixed in this release of JBoss EAP 6, so that the the logging subsystem no longer assumes that its own configurator is used. If the logging subsystem's own configurator is not used, it replaces the original configurator (usually the default configurator). As a result of this fix, custom Java agents can now be used without affecting how the JBoss LogManager is initially configured.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-16 20:27:19 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:
Attachments:
Description Flags
Diff to configure jboss to fail none

Description Kyle Lape 2013-05-31 17:39:25 UTC
Created attachment 755327 [details]
Diff to configure jboss to fail

09:28:18,984 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 5) JBAS014612: Operation ("add") failed - address: ([
    ("subsystem" => "logging"),
    ("console-handler" => "CONSOLE")
]): java.lang.ClassCastException: org.jboss.logmanager.PropertyConfigurator cannot be cast to org.jboss.as.logging.logmanager.ConfigurationPersistence
        at org.jboss.as.logging.logmanager.ConfigurationPersistence.getOrCreateConfigurationPersistence(ConfigurationPersistence.java:93)
        at org.jboss.as.logging.logmanager.ConfigurationPersistence.getOrCreateConfigurationPersistence(ConfigurationPersistence.java:81)
        at org.jboss.as.logging.LoggingOperations$LoggingOperationStepHandler.execute(LoggingOperations.java:154)
        at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:440) [jboss-as-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
        at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:322) [jboss-as-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
        at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:229) [jboss-as-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
        at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:224) [jboss-as-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
        at org.jboss.as.controller.ParallelBootOperationStepHandler$ParallelBootTask.run(ParallelBootOperationStepHandler.java:334) [jboss-as-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [classes.jar:1.6.0_45]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [classes.jar:1.6.0_45]
        at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_45]
        at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.0.Final-redhat-1.jar:2.1.0.Final-redhat-1]

Comment 1 JBoss JIRA Server 2013-06-03 16:41:46 UTC
James Perkins <jperkins> made a comment on jira WFLY-1432

Pull request merged

Comment 3 Petr Kremensky 2013-06-19 12:56:26 UTC
Verified on EAP 6.1.0 ER1

Comment 4 Petr Kremensky 2013-06-19 12:57:46 UTC
Sorry, I meant 6.1.1 ER1