You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Charles Brunson <ch...@sun.com> on 2002/05/03 18:57:39 UTC
junit problem with ant 1.5Beta1
Since switching to ant 1.5 Beta1, I've started seeing the following
error running junit tasks. We're using junit 3.7. I'm wondering if
others are seeing this as well.
test:
[junit] Running com.sun.srs.tools.Suite
[junit] Exception in thread "main" 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:183)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.createAndStoreFormatter(JUnitTestRunner.java:550)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:495)
[junit] TEST com.sun.srs.tools.Suite FAILED
--
Chuck Brunson
x56912
719-277-6912
charles.brunson@sun.com
AIM: chuck9206
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: junit problem with ant 1.5Beta1
Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Charles Brunson" <ch...@sun.com>
To: "ant-dev" <an...@jakarta.apache.org>
Sent: Friday, May 03, 2002 12:35 PM
Subject: Re: junit problem with ant 1.5Beta1
> I've done a little more digging into this and I *think* it's a bug
> in ant 1.5Beta1. If not then maybe someone can explain to me what
> I'm doing wrong. I believe it's a bug in:
> org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter
>
> I can't tell if it's trying to load some kind of native code or it's
> simply referencing a class that doesn't exist.
Its a classpath problem; I've hit it too. I dont think it is necessarily a
1.5 problem; it may have existed before. And we dont have it fully tracked
down to the root cause. (see the mails titled "
Crimson hard coded into junit" in the cool new ant-dev mail archive :
http://nagoya.apache.org/eyebrowse/SummarizeList?listId=4
> Exception in thread "main" java.lang.NoClassDefFoundError:
org/w3c/dom/Node
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:120)
> at
org.apache.tools.ant.taskdefs.optional.junit.FormatterElement.createFormatte
r(FormatterElement.java:183)
> at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.createAndStoreF
ormatter(JUnitTestRunner.java:550)
> at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestR
unner.java:495)
> neurosis%
>
> Let me know if it's something I'm doing wrong and what I need to do
> differently.
problem is that either there is no jaxp api stuff in your classpath...it
looks like the resultformatter is operating inside the classpath used for
the actual junit tests; if it cant find jaxp+xerces or crimson things fail.
1. try setting fork = true
2. add an xml parser to the runtime classpath
BTW, do you have j2ee on your CP? And if so what version?
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: junit problem with ant 1.5Beta1
Posted by Charles Brunson <ch...@sun.com>.
I've done a little more digging into this and I *think* it's a bug
in ant 1.5Beta1. If not then maybe someone can explain to me what
I'm doing wrong. I believe it's a bug in:
org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter
I can't tell if it's trying to load some kind of native code or it's
simply referencing a class that doesn't exist.
Here's how to reproduce it:
java -classpath /src/users/cb9206/nile/config:/src/users/cb9206/nile/
thirdparty/lib/cos.jar:/src/users/cb9206/nile/thirdparty/lib/servlet-2_3.jar:
/src/users/cb9206/nile/thirdparty/lib/hsqldb.jar:/src/users/cb9206/nile
/thirdparty/lib/log4j-1.2rc1.jar:/src/users/cb9206/nile/thirdparty/lib/
jakarta-oro-2.0.5.jar:/src/users/cb9206/nile/thirdparty/lib/java-getopt-1.0.9.jar:
/src/users/cb9206/nile/dist/uuid.jar:/src/users/cb9206/nile/dist/util.jar:
/src/users/cb9206/nile/dist/tools.jar:/src/users/cb9206/nile/dist/cop.jar:
/src/users/cb9206/nile/dist/mlm.jar:/tools/junit3.7/junit.jar:
/tools/jakarta-ant-1.5Beta1/lib/ant.jar:/tools/jakarta-ant-1.5Beta1/lib/optional.jar:
/tools/jakarta-ant-1.5Beta1/lib/xercesImpl.jar org.apache.tools.ant.taskdefs.
optional.junit.JUnitTestRunner com.sun.srs.tools.Suite filtertrace=true
haltOnError=false haltOnFailure=false formatter=org.apache.tools.ant.taskdefs.
optional.junit.XMLJUnitResultFormatter
Here's my result:
neurosis% /tools/J2SE/j2sdk1_3_1_02/jre/bin/java -classpath
/src/users/cb9206/nile/config:/src/users/cb9206/nile/thirdparty/lib/cos.jar:/src/users/cb9206/nile/thirdparty/lib/servlet-2_3.jar:/src/users/cb9206/nile/thirdparty/lib/hsqldb.jar:/src/users/cb9206/nile/thirdparty/lib/log4j-1.2rc1.jar:/src/users/cb9206/nile/thirdparty/lib/jakarta-oro-2.0.5.jar:/src/users/cb9206/nile/thirdparty/lib/java-getopt-1.0.9.jar:/src/users/cb9206/nile/dist/uuid.jar:/src/users/cb9206/nile/dist/util.jar:/src/users/cb9206/nile/dist/tools.jar:/src/users/cb9206/nile/dist/cop.jar:/src/users/cb9206/nile/dist/mlm.jar:/tools/junit3.7/junit.jar:/tools/jakarta-ant-1.5Beta1/lib/ant.jar:/tools/jakarta-ant-1.5Beta1/lib/optional.jar:/tools/jakarta-ant-1.5Beta1/lib/xercesImpl.jar
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner com.sun.srs.tools.Suite filtertrace=true haltOnError=false haltOnFailure=false formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter
Exception in thread "main" java.lang.NoClassDefFoundError: org/w3c/dom/Node
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at org.apache.tools.ant.taskdefs.optional.junit.FormatterElement.createFormatter(FormatterElement.java:183)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.createAndStoreFormatter(JUnitTestRunner.java:550)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:495)
neurosis%
Let me know if it's something I'm doing wrong and what I need to do
differently.
--
Chuck Brunson
x56912
719-277-6912
charles.brunson@sun.com
AIM: chuck9206
Charles Brunson wrote:
> Since switching to ant 1.5 Beta1, I've started seeing the following
> error running junit tasks. We're using junit 3.7. I'm wondering if
> others are seeing this as well.
>
> test:
> [junit] Running com.sun.srs.tools.Suite
> [junit] Exception in thread "main" 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:183)
>
> [junit] at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.createAndStoreFormatter(JUnitTestRunner.java:550)
>
> [junit] at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:495)
>
> [junit] TEST com.sun.srs.tools.Suite FAILED
>
>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>