views:

162

answers:

0

I've encountered buggy behavior:

import groovy.xml.DOMBuilder

def filePath = "MestaXml.log";
def doc  = DOMBuilder.parse(new FileReader(filePath));
def docElm = doc.documentElement;

-

$ groovy SaveTransformer.groovy
Caught: java.lang.LinkageError: loader constraint violation: loader (instance of <bootloader>)
previously initiated loading for a different type with name "org/w3c/dom/NodeList"
    at SaveTransformer.run(SaveTransformer.groovy:5)

However, if I compile the class and run with java, it's fine:

$ groovyc SaveTransformer.groovy

$ java -cp .;groovy-all-1.6.6.jar SaveTransformer

$

This seems as a bug to me. Is it?

The XML file is at here.