SiteMinder Agent for WebLogic : Error: java.lang.NoSuchMethodError: org.apache.logging.log4j.util.StackLocatorUtil.getCallerClassLoader
search cancel

SiteMinder Agent for WebLogic : Error: java.lang.NoSuchMethodError: org.apache.logging.log4j.util.StackLocatorUtil.getCallerClassLoader

book

Article ID: 449571

calendar_today

Updated On:

Products

SITEMINDER

Issue/Introduction

Integration between SiteMinder Agent for Oracle WebLogic Server and Oracle Analytics Server (OAS) fails during startup.

Environment

Environment

  • SiteMinder 12.8
  • Oracle Analytics Server 8.2
  • Oracle WebLogic Server 12.1.4.0
  • Red Hat Enterprise Linux (RHEL) 9.7

Cause

Symptom The following error appears in the WebLogic logs: weblogic.application.ModuleException: java.lang.NoSuchMethodError: org.apache.logging.log4j.util.StackLocatorUtil.getCallerClassLoader(I)Ljava/lang/ClassLoader;

Cause A version mismatch occurs because WebLogic's system class loader loads a different version of Log4j than required by the OAS or SiteMinder components. The method getCallerClassLoader(I) is not available in the version being prioritized by the WebLogic parent classloader.

 

Resolution

Resolution Use library filtering to force WebLogic to use the bundled Log4j libraries.

  1. Locate the weblogic.xml deployment descriptor for the affected application (e.g., Enterprise Manager or OAS).
  2. Add the prefer-application-packages entry to ensure the application uses the bundled Log4j classes:

    XML

    <container-descriptor>    <prefer-application-packages>        <package-name>org.apache.logging.log4j.*</package-name>    </prefer-application-packages></container-descriptor>
  3. If adding libraries via startWebLogic.sh, ensure the Log4j 2.17.1 JARs (e.g., log4j-core-2.17.1.jar and log4j-api-2.17.1.jar) are at the absolute beginning of the CLASSPATH variable.
  4. Stop the server and clear the tmp and cache directories under the WebLogic domain.
  5. Restart the WebLogic instance.