Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-1700

println of org.w3c.dom.Node fails with NoClassDefFoundError: org/apache/xml/serialize/OutputFormat

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0
    • None
    • None
    • Eclipse SDK Version: 3.2.1 Build id: M20060921-0945
      Groovy Plugin 1.0.0.20070118
      Windows XP

    Description

      When I run the following code in a GroovyConsole started from within Eclipse, a NoClassDefFoundError is thrown.

      import groovy.xml.DOMBuilder

      dom = DOMBuilder.newInstance()
      node = dom.foo()
      println node

      Exception thrown: java.lang.NoClassDefFoundError: org/apache/xml/serialize/OutputFormat

      java.lang.NoClassDefFoundError: org/apache/xml/serialize/OutputFormat
      at org.codehaus.groovy.runtime.InvokerHelper.format(InvokerHelper.java:582)
      at org.codehaus.groovy.runtime.InvokerHelper.toString(InvokerHelper.java:189)
      at org.codehaus.groovy.runtime.DefaultGroovyMethods.println(DefaultGroovyMethods.java:322)
      at groovy.lang.Script.println(Script.java:182)
      [snip]

      This does not happen if I run it in a GroovyConsole started standalone with the Groovy 1.0 distribution.

      I get the same exception if I use the XMLUnit XMLAssert.assertXMLEqual in a Groovy JUnit test started from within Eclipse.

      Attachments

        Activity

          People

            jshickey Scott Hickey
            mkoch Michael Koch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: