jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • groovy
  • GROOVY-3914

Bootloader bug with DOMBuilder: java.lang.LinkageError: loader constraint violation: loader previously initiated loading for a different type with name "org/w3c/dom/NodeList"

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.6.6, 1.7-rc-1
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Windows XP
  • Testcase included:
    yes

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

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Ondrej Zizka added a comment - 30/Nov/09 10:42 PM

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)

Show
Ondrej Zizka added a comment - 30/Nov/09 10:42 PM 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)

People

  • Assignee:
    Unassigned
    Reporter:
    Ondrej Zizka
Vote (0)
Watch (0)

Dates

  • Created:
    30/Nov/09 9:49 PM
    Updated:
    30/Nov/09 10:42 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.