org.jboss.logmanager.log4j.JBossLoggerContext cannot be cast to org.apache.logging.log4j.core.LoggerContext
search cancel

org.jboss.logmanager.log4j.JBossLoggerContext cannot be cast to org.apache.logging.log4j.core.LoggerContext

book

Article ID: 281675

calendar_today

Updated On:

Products

CA Identity Suite

Issue/Introduction

After following the prerequisites for JBoss migration within the IM 14.4 documentation, we encountered an error preventing IM from starting successfully after applying Patch 15 to JBoss EAP 7.4. The error is a ClassCastException related to the logging subsystem. This issue does not occur with patches 8 through 14 of JBoss EAP 7.4.
 
Prerequisites:
https://techdocs.broadcom.com/us/en/symantec-security-software/identity-security/identity-manager/14-4/Release-Notes/support-for-jboss-eap-74-and-wildfly-23.html#concept.dita_d3303fde-e786-4fd4-b0b6-e3a28fd60a82_Prerequisites
 
IM 14.4 Platform Support Matrix:
https://techdocs.broadcom.com/us/en/symantec-security-software/identity-security/identity-manager/14-4/platform-support-matrix/server-environments.html
 
Error from the logs:
15:12:26,835 ERROR [ims.workflowFactory] (MSC service thread 1-2) Creating a Connection Factory...: java.lang.ClassCastException: org.jboss.logmanager.log4j.JBossLoggerContext cannot be cast to org.apache.logging.log4j.core.LoggerContext
at com.netegrity.ra.workflow.impl.WFManagedConnectionFactory.initialize(WFManagedConnectionFactory.java:259) [ims.jar:]
at com.netegrity.ra.workflow.impl.WFManagedConnectionFactory.createConnectionFactory(WFManagedConnectionFactory.java:217) [ims.jar:]

Environment

Release : 14.4.x
Component : CA Identity Manager

Resolution

To resolve this ClassCastException and ensure IM starts successfully with JBoss EAP 7.4.15 and later patches, it is necessary to update the jboss-deployment-structure.xml file by adding an exclusion for the logging subsystem. This modification prevents the conflict between JBoss's and IM's logging mechanisms.

In the jboss-deployment-structure.xml file, locate the <exclude-subsystems> tag and add <subsystem name="logging"/> to the list of excluded subsystems as shown below:

<exclude-subsystems>
    <subsystem name="jsf"/>
    <subsystem name="jaxrs"/>
    <subsystem name="logging"/>
</exclude-subsystems>