You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2003/11/12 15:46:09 UTC

DO NOT REPLY [Bug 24646] New: - using format="xml" in gives NoClassDefFoundError

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24646>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24646

using format="xml" in <junit> gives NoClassDefFoundError

           Summary: using format="xml" in <junit> gives NoClassDefFoundError
           Product: Ant
           Version: 1.6Beta
          Platform: PC
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Documentation
        AssignedTo: dev@ant.apache.org
        ReportedBy: sagem@e-mail.dk


I get an error when running a <junit> task with format="xml". The only thing 
I've done to modify the installation is to add xalan.jar to the lib. I've 
ofcourse modified the ANT_HOME to point to the correct installation.

First I get a

    [junit] java.lang.NoClassDefFoundError: org/w3c/dom/Node
    [junit]     at java.lang.Class.forName0(Native Method)
    [junit]     at java.lang.Class.forName(Class.java:115)
    [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.createAndStoreForma
tter(JUnitTestRunner.java:586)
    [junit]     at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main
(JUnitTestRunner.java:531)
    [junit] Exception in thread "main"


I see that this class is found in the xml-apis.jar file, so I add this to the 
classpath, and then get

    [junit] javax.xml.parsers.FactoryConfigurationError: Provider for 
javax.xml.parsers.DocumentBuilderFactory cannot be found
    [junit]     at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown 
Source)
    [junit]     at 
org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter.getDocument
Builder(XMLJUnitResultFormatter.java:89)
    [junit]     at 
org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter.startTestSu
ite(XMLJUnitResultFormatter.java:139)
    [junit]     at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.fireStartTestSuite
(JUnitTestRunner.java:470)
    [junit]     at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run
(JUnitTestRunner.java:280)
    [junit]     at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main
(JUnitTestRunner.java:560)
    [junit] Exception in thread "main"

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