directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Faiz <>
Subject Re: upgrading to nlog4j.1.2.17
Date Tue, 13 Sep 2005 08:56:08 GMT
Hi Ceki,

This is a hard one to replicate - the environment is complex. My current 
environment has four IDEA project modules, each with log4j dependencies. 
One of these modules lists ApacheDS as a dependency. The jar for 
ApacheDS is holding an unpacked slf4j and log4j distro, (see attached 

When I run a main method in module1 (which doesn't use ApacheDS) all log 
statements in modules 1, 2 and 3 work quite well. When it finally 
reaches a logging statement in module4, which *does* use ApacheDS, I see 
a NoSuchMethodError:


The stacktrace is simply related to the chain of execution in the 
current thread (here a TCP Connection, because Im making a HTTP 
Request). It doesn't look helpful in this regard but I can send it to 
you if you would like to see it. It simply seems that the JVM is trying 
to execute a method which doesn't exist.

If I run IDEA with module4 alone, with the log4j dependency and an 
ApacheDS dependency (which includes nlog4j, the same screenshot 
applies), logging works.

Your basic provision that code compiled against log4j will work with 
nlog4j should satisfy our needs, and I agree that it doesn't need to be 

Let me know if you need further information. Good luck!


Ceki Gülcü wrote:
> Hello Nick,
> Could you send me the a stack trace of the NoSuchMethodError?
> As of NLOG4J 1.2.16, code compiled against log4j.jar will run fine with 
> nlog4j.jar. 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.
> Considering the direction of compatibility, perhaps you are trying to 
> access methods only available in nlog4j when only log4j.jar is available 
> in the class path?
> Being somewhat familiar with IDEA, I'd be happy to try reproduce the 
> problem. Do you have a tiny project/test case to make it easy for me?
> Cheers,
> At 03:31 AM 9/13/2005, Nick Faiz wrote:
>> Hey Alex (and others),
>> I was originally sending this to Alex, as a follow up to an 
>> interrupted IM chat, but thought it relevant to send to the dev list. 
>> It relates to upgrading nlog4j.
>> Check out under org.slf4j - you will find 
>> nlog4j.1.2.17 .
>> We need to find a solution for this NoSuchMethodError - I keep seeing 
>> it in IDEA but havent had time to test with ApacheDS in any other 
>> embedded capacity. It's a blocker.
>> Whenever I hit an nlog4j log statement in IDEA, when I have several 
>> modules open, and when my own source code uses log4j but one of the 
>> modules references ApacheDS, I see a NoSuchMethodError.
>> Nick
>> -- 
>> Confluence - the enterprise wiki - tried it yet?
>> -- 


Confluence - the enterprise wiki - tried it yet?

View raw message