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

Upgrading to Groovy 1.1 final snapshot causes LinkageError in Grails

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Won't Fix
    • Affects Version/s: 1.1-rc-2
    • Fix Version/s: 1.1-rc-3
    • Component/s: None
    • Labels:
      None

      Description

      I have a clean Grails project with the following changeset where the Groovy jar is the latest build of 1.1 final:

      the project i have has the following svn changeset
      A lib/groovy-all-1.1-final-SNAPSHOT.jar
      D lib/groovy-all-1.1-rc-1.jar
      M bin/startGrails

      When I run any Gant script in Grails (such as grails list-plugins) that depends on a W3C DOM class i get the error

      java.lang.LinkageError: Class org/w3c/dom/UserDataHandler violates loader constraints
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at org.codehaus.groovy.tools.RootLoader.oldFindClass(RootLoader.java:142)
         at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:114)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
         at java.lang.Class.getDeclaredMethods0(Native Method)
         at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
         at java.lang.Class.getDeclaredMethods(Class.java:1763)
         at org.codehaus.groovy.reflection.CachedClass.getMethods(CachedClass.java:131)
         at groovy.lang.MetaClassImpl.populateMethods(MetaClassImpl.java:238)
         at groovy.lang.MetaClassImpl.fillMethodIndex(MetaClassImpl.java:217)
         at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:2380)
         at groovy.lang.ExpandoMetaClass.initialize(ExpandoMetaClass.java:355)
         at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:164)
         at org.codehaus.groovy.runtime.Invoker.getProperty(Invoker.java:172)
         at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:157)
         at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:500)
         at ListPlugins_groovy.run(ListPlugins_groovy:61)
      

      It appears to originate from a MetaClass look-up. This was not a problem before upgrading Groovy.

        Attachments

          Activity

            People

            • Assignee:
              graemerocher Graeme Rocher
              Reporter:
              graemerocher Graeme Rocher
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: