Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.6.6, 1.7-rc-1
-
None
-
None
-
Windows XP
Description
I've encountered buggy behavior with Groovy 1.6.6 and 1.7-rc-1:
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
$
For the case the XML file was needed:
http://ondra.zizka.cz/stranky/programovani/java/groovy-dombuilder-bug.texy