Solutions
Archived

java.lang.LinkageError: after upgrading to OpenAM 11.x or 12.x deployed on an Oracle® WebLogic 12c server

Last updated Jan 5, 2021

The purpose of this article is to provide assistance if you encounter a class loader constraint violation weblogic.application.ModuleException: java.lang.LinkageError: when starting OpenAM following an upgrade to OpenAM 11.x or 12.x deployed on an Oracle WebLogic 12c server.


Archived

This article has been archived and is no longer maintained by ForgeRock.

Symptoms

The following error is shown when OpenAM is starting up

<May 13, 2014 1:51:13 PM CEST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID "1399981871678" for task "9". Error is: "weblogic.application.ModuleException: java.lang.LinkageError: loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of sun/misc/Launcher$AppClassLoader) for resolved class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type LoggerFactory; used in the signature" weblogic.application.ModuleException: java.lang.LinkageError: loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of sun/misc/Launcher$AppClassLoader) for resolved class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type LoggerFactory; used in the signature at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140) at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:213) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:208) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42) Truncated. see log file for complete stacktrace Caused By: java.lang.LinkageError: loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of sun/misc/Launcher$AppClassLoader) for resolved class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type LoggerFactory; used in the signature at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:299) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281) at org.forgerock.jaspi.filter.AuthNFilter.<clinit>(AuthNFilter.java:69) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) Truncated. see log file for complete stacktrace

Recent Changes

Upgraded to OpenAM 11.x or 12.x

Migrated from Oracle WebLogic 11g server to 12c.

Causes

This version of Weblogic uses an updated version of the com.bea.core.apache.commons.lang jar file that previously caused a conflict with OpenAM. This updated version no longer causes a conflict; however, if you previously changed the <prefer-web-inf-classes> element to true to resolve this conflict, you will now get an exception.

Solution

This issue can be resolved by changing the <prefer-web-inf-classes> element back to false in the weblogic.xml file. This file should then be included in the openam.war/WEB-INF directory before you deploy the openam.war file.

Note

You must restart the WebLogic application container in which OpenAM runs to apply these configuration changes. 

See Also

java.lang.NoSuchMethodError: after upgrading to OpenAM 11.x or 12.x deployed on an Oracle WebLogic 11g server

OpenAM Installation Guide › Preparing For Installation › Preparing Oracle WebLogic

Related Training

N/A

Related Issue Tracker IDs

OPENAM-4000 (Class loading error in Weblogic 12c)


Copyright and Trademarks Copyright © 2021 ForgeRock, all rights reserved.