Hi, This issue is described in the wiki (as noted by James Carman). The problem is that you have commons logging (including a copy of the Log interface) in a jar in some container classpath, then you have commons-logging in your deployed ear also (including an adapter to a specific logging library in a jar in your deployed ear classpath AND another copy of the Log interface).
In this situation, the commons-logging LogFactory class tries to load a logging adapter from the ear classpath (and succeeds) then tries to cast it to the Log interface. However it is trying to cast it to *the Log interface as loaded via the container classpath*, while the adapter actually implements *the log interface as loaded via the ear classpath*. The cast therefore fails, and the LogFactory is unable to access that adapter implementation. The best solution is to use commons-logging 1.1's commons-logging-adapters.jar file in your ear. This jar does not contain a copy of the Log interface, so no such problems can occur. The commons-logging-1.1 release is currently at RC10 (may be RC11 by the time you read this, as some documentation was updated). See: people.apache.org/~rdonkin/commons-logging. The final release is expected in the next few days. As you discovered, playing with parent-first vs child-first classloading order can also avoid the problem with having multiple copies of the Log interface in the classpath. Or removing commons-logging.jar from the ear completely will solve it, though at the price of being unable to configure logging on a per-component basis. This is addressed on the wiki, and is also discussed in the commons-logging 1.1 documentation (which is available via the url listed above, or will be on the main site once the 1.1 release is completed). Regards, Simon On Thu, 2006-05-04 at 10:21 +0530, Balajee Csekaran wrote: > Hi all > Thanks for all your suggestions > > I got it resolved by changing the following values in certain XML Files > 1) In > JBOSS_HOME\server\atg\deploy\jbossweb-tomcat55.sar\META-INF\jboss-servic > e.xml > Changed Values of > a) "Java2ClassLoadingCompliance" to "true" > b) "UseJBossWebLoader" to "true" > > 2) In JBOSS_HOME\server\atg\deploy\ear-deployer.xml > Changed Values of > a) "Isolated" to "false" > b) "CallByValue" to "false" > > And I have NO IDEA why these changes made my application deploy > properly. > > Also JBoss AS 4.0.1 SP1 has no such problems, ATG applications get > deployed without single error message. > > If you are planning to use ATG Framework applications with JBoss AS > please look at the version compatibility chart before you proceed > http://www.atg.com/en/products/architecture/requirements/atg_71.jhtml > > cheers > Balajee C > > -----Original Message----- > From: Mike Sparr - www.goomzee.com [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 03, 2006 10:46 PM > To: Jakarta Commons Users List > Subject: Re: Log4JLogger does not implement Log > > I've had similar issues. Was resolved by adding application classpath > to > startup script before JBOSS classpath. Ultimately we decided to just > use > JBOSS'S /server/default/all/conf/ ... Xml configuration for logging. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
