directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Faiz <n...@atlassian.com>
Subject notification of possible problem with nlog4j-1.2.14 & log4j compatibility
Date Tue, 16 Aug 2005 04:47:37 GMT
Guys,

Here is notification of a possible incompatibility between log4j and nlog4j.

I've been encountering it within IDEA, as I try to integrate one 
library, which contains a dependency to ApacheDS, within another 
application, which contains a dependency to vanilla log4j.

In IDEA the problem occurs as a NoSuchMethodError for simple logging 
statements:

java.lang.NoSuchMethodError: 
org.apache.log4j.Logger.debug(Ljava/lang/String;)V

The implementation of org.apache.log4j.Category (and 
org.apache.log4j.Logger) differs between nlog4j and log4j. When running 
within IDEA the problem is noticed late in the piece.

I've written a quick test application, which has two classes. One with a 
dependency on org.apache.log4j.Logger with its own log4j library (ver 
1.2.8) and another class with an nlog4j 1.2.14 dependency. It results in a

Exception in thread "main" java.lang.IncompatibleClassChangeError

Note - this is at runtime, not during compilation.

I'm going to follow up this problem with the nlog4j team later this 
evening. I'm just letting people know of the possible issue.

SLF4J should be able to run happily within applications already using 
Log4j. If it can't it means that ApacheDS wont be compatible with 
pre-existing applications relying upon log4j, unless we remove SLF4J or 
unless it is repaired.

Cheers,
Nick


-- 
ATLASSIAN - http://www.atlassian.com/

Confluence - the enterprise wiki - tried it yet?
http://www.atlassian.com/confluence/
--

Mime
View raw message