Symptom:
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: StockTradeDemoDCC@StockTradeDemoDCC.war]. log4j:ERROR Could not instantiate appender named "CUSTOMER_APPENDER_NAME".
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.
Solution:
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
For a WebLogic Server running as a command line application, make this change by editing the startWeblogic.cmd (Windows) or startWeblogic.sh (UNIX) script located in WLS_HOME/user_projects/domains/your_domain/bin.
log4j.category.com.netegrity.tm=DEBUG
log4j.category.com.netegrity.tm=DEBUG, A2
| Copyright © 2011 CA. All rights reserved. | Email CA Technologies about this topic |