ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Hatton" <khat...@axiomsystems.com>
Subject RE: Junit/JunitReport in Ant 1.5.3.1/1.6alpha
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 [mailto:hoju@visi.com]
Sent: 25 July 2003 16:45
To: Ant Users List
Subject: RE: Junit/JunitReport in Ant 1.5.3.1/1.6alpha



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.

Jake

At 03:41 PM 7/25/2003 +0100, you wrote:
>Hi,
>
>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 1.5.3.1, 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?
>
>Thanks
>Keith
>
>
>     [junit] Executing 
> 'D:\Progra~1\JavaSoft\jdk1.3.1_01a\jre\bin\java.exe' with
>arguments:
>     [junit] '-classpath'
>     [junit] 
> 'E:\dev\current\build\o2s\ejb\tmp\instrumented;E:\dev\release\v5.3\O
>2S\O2SAPI.jar;E:\dev\current\build\o2s\ejb\tmp\classes;E:\dev\current\technology
>\Java\resources;E:\dev\release\v5.3\O2S\jboss\O2SEJB.jar;D:\tools\gsbase-2.0\gsb
>ase-2.0.jar;D:\tools\Ant1.6alpha\lib\junit.jar;D:\tools\jcoverage-1.0.4\jcoverag
>e.jar;D:\Tools\Ant1.6alpha\lib\junit.jar;D:\Tools\Ant1.6alpha\lib\ant.jar;D:\Too
>ls\Ant1.6alpha\lib\ant-junit.jar'
>     [junit] 'org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner'
>     [junit] 'com.axiomsystems.o2s.values.attributes._junit_TextAttribute'
>     [junit] 'filtertrace=true'
>     [junit] 'haltOnError=false'
>     [junit] 'haltOnFailure=false'
>     [junit] 
> 'formatter=org.apache.tools.ant.taskdefs.optional.junit.SummaryJUnit
>ResultFormatter'
>     [junit] 'showoutput=false'
>     [junit] 
> 'formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResu
>ltFormatter,E:\dev\current\build\o2s\ejb\TEST-com.axiomsystems.o2s.values.attrib
>utes._junit_TextAttribute.xml'
>     [junit] 
> 'propsfile=E:\dev\current\build\o2s\ejb\junit1742787289.properties'
>     [junit]
>     [junit] The ' characters around the executable and arguments are
>     [junit] not part of the command.
>Execute:Java13CommandLauncher: Executing 
>'D:\Progra~1\JavaSoft\jdk1.3.1_01a\jre\
>bin\java.exe' with arguments:
>'-classpath'
>'E:\dev\current\build\o2s\ejb\tmp\instrumented;E:\dev\release\v5.3\O2S\O2SAPI.ja
>r;E:\dev\current\build\o2s\ejb\tmp\classes;E:\dev\current\technology\Java\resour
>ces;E:\dev\release\v5.3\O2S\jboss\O2SEJB.jar;D:\tools\gsbase-2.0\gsbase-2.0.jar;
>D:\tools\Ant1.6alpha\lib\junit.jar;D:\tools\jcoverage-1.0.4\jcoverage.jar;D:\Too
>ls\Ant1.6alpha\lib\junit.jar;D:\Tools\Ant1.6alpha\lib\ant.jar;D:\Tools\Ant1.6alp
>ha\lib\ant-junit.jar'
>'org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner'
>'com.axiomsystems.o2s.values.attributes._junit_TextAttribute'
>'filtertrace=true'
>'haltOnError=false'
>'haltOnFailure=false'
>'formatter=org.apache.tools.ant.taskdefs.optional.junit.SummaryJUnitResultFormat
>ter'
>'showoutput=false'
>'formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,
>E:\dev\current\build\o2s\ejb\TEST-com.axiomsystems.o2s.values.attributes._junit_
>TextAttribute.xml'
>'propsfile=E:\dev\current\build\o2s\ejb\junit1742787289.properties'
>
>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(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:564)
>     [junit]     at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.
>main(JUnitTestRunner.java:509)
>     [junit] Exception in thread "main"
>
>     [junit] TEST 
> com.axiomsystems.o2s.values.attributes._junit_TextAttribute FAI
>LED
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org


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


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


Mime
View raw message