Commons Logging conflicts with the SOA Security Manager Agent.

Document ID : KB000022666
Last Modified Date : 14/02/2018
Show Technical Document Details

Problem:

The SOA Agent for WebLogic uses the Apache Commons Logging package as part of its logging implementation. Class loading conflicts can occur when the SOA Agent is configured to protect web services that also use Commons Logging if the web service and SOA Agent are not using the same version of Commons Logging.

If such a class loading conflict is occurring, WebLogic may log an error output similar to the following during initialization:

<Sep 16, 2009 9:15:54 AM EDT> <Error> <HTTP> <BEA-101216> <Servlet: "ServicesServlethttp" 
failed to preload on startup in Web application: "XXXXXX.war". 
java.lang.ExceptionInInitializerError?. 
org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfig 
urationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.) (Caused by org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.)) 
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)

 

Environment: 

CA Single Sign-On SOA Agent 12.0 and 12.1

 

Cause:

Version conflict of Apache Commons Logging package.

 

Resolution:

To remove class loading conflicts between the SOA Agent and the protected web service, verify that the web service uses the same version of the Apache Commons Logging jar file (commons-logging.jar) as the SOA Agent (version 1.1.1). If the web service is not using the same version, replace the commons-logging.jar used by the web service with the 1.1.1 version.