ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Hatton" <khat...@axiomsystems.com>
Subject Ant 1.6 and JUnit - NoClassDefFoundError
Date Wed, 07 Jan 2004 13:29:10 GMT
I'm just taking a look at Ant 1.6 and I'm having a problem with a build file that works fine
in 1.5.3.

java -version gives 1.3.1
ant -version gives 1.6

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.

Now for *every* test suite in the build I get the following error.

    [junit] java.lang.NoClassDefFoundError: org/w3c/dom/Node
    [junit]     at java.lang.Class.forName0(Native Method)
    [junit]     at java.lang.Class.forName(Class.java:120)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.FormatterElement
.createFormatter(FormatterElement.java:236)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.FormatterElement
.createFormatter(FormatterElement.java:220)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.
createAndStoreFormatter(JUnitTestRunner.java:586)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.
main(JUnitTestRunner.java:531)

I'm guessing that this must have something to do with the re-packaing of JARs in ANT_HOME/lib
or the scary bit in the release notes about changes to classloaders. If anyone has come across
similar problems, or has ideas for how to fix this, I'd be glad to hear from them.

Thanks
Keith


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message