ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Hatton" <>
Subject RE: Junit/JunitReport in Ant
Date Fri, 25 Jul 2003 15:48:38 GMT
That's my point - they ARE in ANT_HOME/lib but when the <junit> task is forked, they
AREN'T being included in the classpath for that JVM.

-----Original Message-----
From: Jacob Kjome []
Sent: 25 July 2003 16:45
To: Ant Users List
Subject: RE: Junit/JunitReport in Ant

Where are XercesImpl.jar and xml-apis.jar?  Don't they come, by default, in 
Ant's ANT_HOME/lib?  I don't see them in the classpath.  Do any other your 
other jars or any of your defined classpaths or the JAVA_HOME/lib/ext 
contain the w3c dom libraries?  NoClassDefFound usually happens when the 
class can be found, but the definition doesn't match what is expected by 
the caller or maybe it is in a classloader that isn't accessible by the 
current one.  If it wasn't there at all, you'd get a ClassNotFoundException 
(I think that's the name).

Anyway, this is definitely a classpath issue and is unlikely a bug in Ant 
itself.  Good luck in finding the root cause.


At 03:41 PM 7/25/2003 +0100, you wrote:
>Thanks Jake, you have definitely pointed me in the right direction. I'm 
>not there yet, but I can see roughly where the problem is.
>Using Ant, my forked junit process has, amongst others, 
>optional.jar in its classpath. The manifest of optional.jar pulls in the 
>xml jars.
>Using Ant 1.6 alpha, optional.jar isn't there. Instead I have 
>ant-junit.jar. But there is nothing to pull in the XML libraries in this 
>case. Hence the NoClassDefFoundError, I think.
>I'm including the pertinent output of ant -debug to show exactly what 
>classpath is being used. Everything up to and including gsbase-2.0.jar is 
>specified by me. The rest is constructed by Ant.
>I'll do some playing around with classpaths, but maybe others have ideas 
>on this.
>Is it a bug in 1.6 alpha that I should raise?
>     [junit] Executing 
> 'D:\Progra~1\JavaSoft\jdk1.3.1_01a\jre\bin\java.exe' with
>     [junit] '-classpath'
>     [junit] 
> 'E:\dev\current\build\o2s\ejb\tmp\instrumented;E:\dev\release\v5.3\O
>     [junit] ''
>     [junit] 'com.axiomsystems.o2s.values.attributes._junit_TextAttribute'
>     [junit] 'filtertrace=true'
>     [junit] 'haltOnError=false'
>     [junit] 'haltOnFailure=false'
>     [junit] 
> '
>     [junit] 'showoutput=false'
>     [junit] 
> '
>     [junit] 
> 'propsfile=E:\dev\current\build\o2s\ejb\'
>     [junit]
>     [junit] The ' characters around the executable and arguments are
>     [junit] not part of the command.
>Execute:Java13CommandLauncher: Executing 
>bin\java.exe' with arguments:
>The ' characters around the executable and arguments are
>not part of the command.
>     [junit] java.lang.NoClassDefFoundError: org/w3c/dom/Node
>     [junit]     at java.lang.Class.forName0(Native Method)
>     [junit]     at java.lang.Class.forName(
>     [junit]     at 
>     [junit]     at 
>     [junit]     at 
>     [junit]     at 
>     [junit] Exception in thread "main"
>     [junit] TEST 
> com.axiomsystems.o2s.values.attributes._junit_TextAttribute FAI
>To unsubscribe, e-mail:
>For additional commands, e-mail:

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

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

View raw message