Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.6.6, 1.7-rc-1
-
Fix Version/s: 2.0.6
-
Component/s: None
-
Labels:None
-
Environment:Windows XP
-
Testcase included:yes
-
Number of attachments :
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
Java version:
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)