diff --git a/docs/faq.html b/docs/faq.html index 8971fa607..1ef498b8d 100644 --- a/docs/faq.html +++ b/docs/faq.html @@ -347,6 +347,12 @@ The program I run via <java> throws an exception but I can't seem to get the full stack trace. + +
NoClassDefFoundError
if forked.
+
As a workaround, run your <java> task with
fork="true"
and Ant will display the full
trace.
+
+
+ Using format="xml", <junit> fails with a
+ NoClassDefFoundError
if forked.
+
+
The XML formatter needs the DOM classes to work. If you + are using JDK 1.4 or later they are included with your Java + Runtime and this problem won't occur. If you are running JDK + 1.3 or earlier, the DOM classes have to be on your + <junit> task's <classpath>.
+Prior to Ant 1.6.0 Ant would include the DOM classes from + the XML parser that is used by Ant itself if you set the + includeAntRuntime attribute to true (the default). With Ant + 1.6.0 this has been changed as this behavior made it + impossible to use a different XML parser in your tests.
+This means that you have to take care of the DOM classes + explicitly starting with Ant 1.6.0. If you don't need to set + up a different XML parser for your tests, the easiest solution + is to add
++<pathelement path="${ant.home}/lib/xml-apis.jar:${ant.home}/lib/xercesImpl.jar"/> ++
to your task's <classpath>.
diff --git a/docs/manual/OptionalTasks/junit.html b/docs/manual/OptionalTasks/junit.html index 9569b9c68..0fcf47e74 100644 --- a/docs/manual/OptionalTasks/junit.html +++ b/docs/manual/OptionalTasks/junit.html @@ -132,7 +132,11 @@ elements).false
and use the XML formatter
+ at the same time.
true
.Note: Please read the Ant FAQ if you want to
+set the fork attribute to true
, the includeAntRuntime
+attribute to false
and use the XML formatter at the same
+time.
Attribute | diff --git a/xdocs/faq.xml b/xdocs/faq.xml index 10d94f842..47c395e2c 100644 --- a/xdocs/faq.xml +++ b/xdocs/faq.xml @@ -1435,6 +1435,40 @@ mv /tmp/foo $ANT_HOME/bin/antRun trace. + +