Problem:
The SOA Agent for WebLogic uses the Apache log4j package to produce logging output. This can lead to class loading and logging output conflict problems when the SOA Agent is configured to protect web services that also use the log4j package.
If such a conflict is occurring WebLogic logs error output similar to the following:
log4j:ERROR A "org.apache.log4j.DailyRollingFileAppender" object is not assignable to a "o
rg.apache.log4j.Appender" variable.
log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
log4j:ERROR [java.net.URLClassLoader@d8116d] whereas object of type
log4j:ERROR "org.apache.log4j.DailyRollingFileAppender" was loaded by [weblogic.utils.clas
sloaders.ChangeAwareClassLoader@10abd60 finder: weblogic.utils.classloaders.CodeGenClassFinder@5e33d4 annotation: [email protected]].
log4j:ERROR Could not instantiate appender named "CUSTOMER_APPENDER_NAME".
Cause:
This error is caused by the web service class loader loading the specific Appender implementation class: DailyRollingFileAppender and the SOA Agent class loader loading the Appender interface class.
Resolution:
Configure the system class loader to load the log4j jar instead of the SOA Agent and web service class loaders by adding log4j.jar to the JVM classpath.
To configure the system class loader to load the log4j package