ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tolley Shorn" <Shorn.Tol...@nrm.qld.gov.au>
Subject RE: Ant 1.6 and JUnit - NoClassDefFoundError
Date Thu, 08 Jan 2004 00:39:04 GMT
The other day I had similar junit related classpath problems that were caused by having a space
in the path that the ant home wsa sitting in, you might want to check you haven't installed
Ant in "Program Files" or anything.

> -----Original Message-----
> From: Keith Hatton [mailto:khatton@axiomsystems.com]
> Sent: Wednesday, 7 January 2004 11:29 PM
> To: Ant-User (E-mail 2)
> Subject: Ant 1.6 and JUnit - NoClassDefFoundError
> 
> 
> 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
> 
> 


************************************************************************
The information in this e-mail together with any attachments is
intended only for the person or entity to which it is addressed
and may contain confidential and/or privileged material.
Any form of review, disclosure, modification, distribution
and/or publication of this e-mail message is prohibited.  
If you have received this message in error, you are asked to
inform the sender as quickly as possible and delete this message
and any copies of this message from your computer and/or your
computer system network.  
************************************************************************


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


Mime
View raw message