> From: Jörg Schaible [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 10, 2008 10:56 PM > To: Jakarta Commons Developers List > Subject: RE: [VOTE] Release commons-fileupload 1.2.1 (rc3) > > Hi Gary, > > Gary Gregory wrote: > > Hello: > > > > The ant build in this RC fails on Sun Java 1.3.1 [1] because > > the unit tests use the XML formatter which depend on W3C > > code. The W3C code is in Java 1.4 but not 1.3. The ant build > > also reports, apparently non-fatal errors [1] when attempting > > to fetch non-existent files out of the maven repos. > > > > Personally, I no longer care about 1.3.1 but I thought you might like > > to know. > > This can be fixed by adding Xalan 2.7.0 to Ant's lib, but you have to use the > one > from Apache's Maven repo, not the one from their distribution. Se > http://jira.codehaus.org/browse/HAUS-1572 That does not work for me, no matter what version of Xalan I put in ANT_HOME/lib, I always get: Using loader null on class org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter: java.lang.NoClassDefFoundError: org/w3c/dom/Node at org.apache.tools.ant.taskdefs.optional.junit.FormatterElement.createFormatter(FormatterElement.java:241) at org.apache.tools.ant.taskdefs.optional.junit.FormatterElement.createFormatter(FormatterElement.java:214) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.transferFormatters(JUnitTestRunner.java:818) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:910) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) --- Nested Exception --- java.lang.NoClassDefFoundError: org/w3c/dom/Node at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:115) at org.apache.tools.ant.taskdefs.optional.junit.FormatterElement.createFormatter(FormatterElement.java:232) at org.apache.tools.ant.taskdefs.optional.junit.FormatterElement.createFormatter(FormatterElement.java:214) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.transferFormatters(JUnitTestRunner.java:818) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:910) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) Then I read: http://ant.apache.org/faq.html#junit-no-runtime-xml This states that the only way to fix this is to fix one's build.xml file like so: "the easiest solution is to add <pathelement path="${ant.home}/lib/xml-apis.jar:${ant.home}/lib/xercesImpl.jar"/> to your task's <classpath>." I implemented this and the build succeeded. So I am submitting the attached patch to build.xml. This path element is ignored by Java versions >= 1.4 since one must use the override mechanism to use different XML libs than what is in the runtime. Tracking here: https://issues.apache.org/jira/browse/FILEUPLOAD-153 Thank you, Gary > > - Jörg > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED]