commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Srivastava, Abhinav" <asriv...@amgen.com>
Subject RE: commons-logging
Date Thu, 11 Nov 2004 00:40:18 GMT
The exception was actually on client side and when I added log4j library in
the classpath it worked. 
Now, the question is why was it trying to use log4j if it was not in the
classpath.


-----Original Message-----
From: robert burrell donkin
[mailto:robertburrelldonkin@blueyonder.co.uk]
Sent: Wednesday, November 10, 2004 1:29 PM
To: Jakarta Commons Users List
Subject: Re: commons-logging



On 10 Nov 2004, at 20:42, Srivastava, Abhinav wrote:

> In our EAR we have both commons..jar and log4j-1.2.8.jar at the root. 
> I just
> upgraded commons-log to 1.0.4 from 1.0.3. and I am getting this -
> weblogic.rjvm.PeerGoneException: ; nested exception is:
>
> weblogic.utils.NestedException: org/apache/log4j/Category - with nested
> exception:
>
> [java.lang.NoClassDefFoundError: org/apache/log4j/Category]
>
> Clues ??

the error is a bit perplexing: upon upgrade, linkage exceptions such as 
IncompatibleClassChangeError are more indicative of a issue with 
libraries. (1.0.4 has some delicate code which allows both 1.2.8 and 
1.3 versions to be supported.)

first the obvious: that you've updated the references appropriately in 
your EAR - make sure that both commons-logging and log4j are in the 
same classloader. this is really, really important and can be tricky (i 
know that i've had to battle on occasion in the past.) also, please 
double (and even triple) check that there are no commons-logging jars 
anywhere elsewhere on the classpath. (if commons-logging is in a higher 
classloader then it will not be able to load log4j classes.)

second, it's possible that the exception is badly reported (but really 
caused by library issues). if this is the case then test upgrading the 
log4j to the latest release. if the problem goes away, then it's a 
misreported library compatibility issue - please open a bugzilla or 
post something to the list. (i'm not aware of any compatibility issues 
with earlier log4j releases and we need to know if there are any.)

if the first two don't work, then try upgrading to the latest version 
of commons-logging. if the problem goes away but you find that things 
are not logging through log4j then it's almost certainly a classloader 
issue (repeat the checks made in the first case). if it's not anything 
on the list, then there's a chance that it's possibly a real issue with 
the library so post back to the list with as much information as 
possible (including weblogic versions and full stack traces)...

- robert


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message