ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Hatton" <>
Subject RE: Ant 1.6 and JUnit - NoClassDefFoundError
Date Wed, 07 Jan 2004 15:06:22 GMT
Thanks Stefan, that sounds exactly like the problem (and the solution).


-----Original Message-----
From: Stefan Bodewig []
Sent: 07 January 2004 14:09
Subject: Re: Ant 1.6 and JUnit - NoClassDefFoundError

On Wed, 7 Jan 2004, Keith Hatton <> wrote:

> The only changes to the standard installation is that I've copied
> junit.jar and xalan.jar into ANT_HOME/lib (which I did for Ant 1.5)
> - prior to this the build complained that it couldn't find JUnit
> classes.

You are forking junit and have includeantruntime set to false,

Ant 1.5 had an unfortunate xercesImpl.jar entry in ant.jar's and
optional.jar's manifest that caused lot of problems for people who
wanted to use a different XML parser in their test.  This has been
fixed in 1.6.

A side effect of that bug was that you head a full fledged XML parser
and supporting classes available in the VM running the tests in 1.5
which you don't have anymore in 1.6 - unless you add xml-apis.jar
(should be all you need) to your <classpath>.

So yes, there is a backwards incompatibility but it is easy to fix.
Either add xml-apis.jar explicitly to your <classpath> or don't use
the XML formatter.


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message