You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Nick Faiz <ni...@atlassian.com> on 2005/08/16 06:47:37 UTC

notification of possible problem with nlog4j-1.2.14 & log4j compatibility

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/
--

Re: notification of possible problem with nlog4j-1.2.14 & log4j compatibility

Posted by Alex Karasulu <ao...@bellsouth.net>.
Nick Faiz wrote:


NLog4J Log4J incompatability can be a serious integration issue for 
embedding ApacheDS.

> 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.
>
Great! Keep us posted Nick.  I'm sure Ceki will find a fast solution to 
this problem.

Alex

Re: notification of possible problem with nlog4j-1.2.14 & log4j compatibility

Posted by Alex Karasulu <ao...@bellsouth.net>.
Nick Faiz wrote:

> Ceki,
>
> As noted on the nlog4j-dev list I will upgrade our dependency and test 
> ASAP.
>
> Thanks for the quick response time. :)

Yes Ceki thanks much for the immediate support.

Alex


Re: notification of possible problem with nlog4j-1.2.14 & log4j compatibility

Posted by Nick Faiz <ni...@atlassian.com>.
Ceki,

As noted on the nlog4j-dev list I will upgrade our dependency and test 
ASAP.

Thanks for the quick response time. :)

Nick


Ceki Gülcü wrote:
> 
> Hello Nick,
> 
> The problem should be fixed in NLOG4J version 1.2.16. With this version 
> code compiled with log4j will run fine in both log4j and NLOG4J. I think 
> this is the problem you encountered and would like to see fixed. So, 
> that's done. :-)
> 
> However, the inverse is not true. Code compiled with NLOG4J will only 
> run with NLOG4J. This means that your code, when compiled with NLOG4J, 
> will depend on NLOG4J, which in my humble opinion is a rather reasonable 
> requirement. Especially if you consider that NLOG4J has SLF4J support 
> which log4j does not have.
> 
> At 06:47 AM 8/16/2005, Nick Faiz wrote:
> 
>> Guys,
>>
>> Here is notification of a possible incompatibility between log4j and 
>> nlog4j.
> 
> 


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

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

Re: notification of possible problem with nlog4j-1.2.14 & log4j compatibility

Posted by Ceki Gülcü <li...@qos.ch>.
Hello Nick,

The problem should be fixed in NLOG4J version 1.2.16. With this version 
code compiled with log4j will run fine in both log4j and NLOG4J. I think 
this is the problem you encountered and would like to see fixed. So, that's 
done. :-)

However, the inverse is not true. Code compiled with NLOG4J will only run 
with NLOG4J. This means that your code, when compiled with NLOG4J, will 
depend on NLOG4J, which in my humble opinion is a rather reasonable 
requirement. Especially if you consider that NLOG4J has SLF4J support which 
log4j does not have.

At 06:47 AM 8/16/2005, Nick Faiz wrote:
>Guys,
>
>Here is notification of a possible incompatibility between log4j and nlog4j.

-- 
Ceki Gülcü

   The complete log4j manual: http://www.qos.ch/log4j/