directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luke Taylor <>
Subject Re: nlog4j/log4j conflict problem (IncompatibleClassChangeError) with embedded server
Date Thu, 02 Feb 2006 15:42:28 GMT
Hi Emmanuel,

The problem is that log4j is a dependency of many other projects (e.g.
Spring) which we depend on, and maven2 ends up with it in the classpath

I don't think it's anything to do with the ADS version. I already have
the latest source and I'm building our project with the latest snapshots

which were built today, it seems. The apache-ds core still has a
dependency on nlog4j in the latest Maven 2 file:

So if I am building another project which uses apache-ds, I get both
log4j and nlog4j appearing in the test classpath which is a recipe for

I *think* (perhaps a Maven 2 expert can confirm), that if nlog4j is
marked as optional in the pom.xml, then it won't automatically be added
to my transitive dependencies list and I can then manually add whatever
version of slf4j I want to use. This is a particularly nasty problem and
hard to work out what's going on when you first come across it so I
think it's likely to recur when more people start adding apache-ds jar
files to their builds.

I could be completely wrong of course - in fact I'd be pleased if
there's a simple workaround.


Emmanuel Lecharny wrote:
> Hi Luke, Ceki,
> I think that the pb come from the ADS version you are using. We now have
> cleaned ADS, in order to avoid a log4j.jar dependency. This will be the
> 1.0-RC1 version, if you can wait a little bit.
> Otherwise, you can build a fresh jar from the trunks in order to fix
> your problem (I hope it will !).
> Regards, 

 Luke Taylor.                      Monkey Machine Ltd.
 PGP Key ID: 0x57E9523C  

View raw message