groovy
  1. groovy
  2. GROOVY-4220

Groovy-all-jdk14-1.6.8 fails on Java 1.4 (java/util/concurrent/locks/AbstractQueuedSynchronizer)

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.6.7, 1.6.8
    • Fix Version/s: 1.6.9
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      groovy-all-jdk14-1.6.8.jar fails on Java 1.4.

      The following Java code shows the problem:

      GroovyClassLoader loader = new GroovyClassLoader();
      loader.parseClass("");
      

      This produces the following stack trace:

      java.lang.NoClassDefFoundError: java/util/concurrent/locks/AbstractQueuedSynchronizer
      	at java.lang.ClassLoader.defineClass0(Native Method)
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
      	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
      	at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
      	at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
      	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
      	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
      	at java.lang.ClassLoader.defineClass0(Native Method)
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
      	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
      	at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
      	at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
      	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
      	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
      	at groovyjarjarbackport.java.util.concurrent.ConcurrentHashMap.<init>(ConcurrentHashMap.java:602)
      	at groovyjarjarbackport.java.util.concurrent.ConcurrentHashMap.<init>(ConcurrentHashMap.java:653)
      	at groovyjarjarretroruntime.impl.WeakIdentityTable.<init>(WeakIdentityTable.java:42)
      	at groovyjarjarretroruntime.java.lang.Enum_$1.<init>(Enum_.java:49)
      	at groovyjarjarretroruntime.java.lang.Enum_.<clinit>(Enum_.java:47)
      	at org.codehaus.groovy.transform.ASTTransformationVisitor.addPhaseOperations(ASTTransformationVisitor.java:160)
      	at org.codehaus.groovy.control.CompilationUnit.<init>(CompilationUnit.java:180)
      	at org.codehaus.groovy.control.CompilationUnit.<init>(CompilationUnit.java:117)
      	at groovy.lang.GroovyClassLoader.createCompilationUnit(GroovyClassLoader.java:444)
      	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:267)
      	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:250)
      	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:245)
      	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:206)
      	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:216)
      

        Activity

        Hide
        Paul King added a comment -

        ok, will look into it further ...

        Show
        Paul King added a comment - ok, will look into it further ...
        Show
        Paul King added a comment - How about this version - Roshan applied another fix: http://snapshots.repository.codehaus.org/org/codehaus/groovy/groovy-all-jdk14/1.6.9-SNAPSHOT/groovy-all-jdk14-1.6.9-20100615.074507-2.jar
        Hide
        Guillaume Laforge added a comment -

        SebbASF, as soon as you give us your feedback that everything's okay now, we should be able to make a release for 1.6.9.
        Thanks in advance for your feedback.

        Also, please notice going forward, it may be the last version of the 1.6.x branch, so also the last version of Groovy being compatible with JDK 1.4.
        So if you can consider moving to a newer JDK, that would be a good thing – JDK 1.5 is even already End-of-life'd!

        Show
        Guillaume Laforge added a comment - SebbASF, as soon as you give us your feedback that everything's okay now, we should be able to make a release for 1.6.9. Thanks in advance for your feedback. Also, please notice going forward, it may be the last version of the 1.6.x branch, so also the last version of Groovy being compatible with JDK 1.4. So if you can consider moving to a newer JDK, that would be a good thing – JDK 1.5 is even already End-of-life'd!
        Hide
        SebbASF added a comment -

        java -cp groovy-all-jdk14-1.6.9-20100615.074507-2.jar groovy.ui.Console

        works on

        java -version
        java version "1.4.2_19"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_19-b04)
        Java HotSpot(TM) Client VM (build 1.4.2_19-b04, mixed mode)

        So I think you have fixed the problem - thanks!

        Show
        SebbASF added a comment - java -cp groovy-all-jdk14-1.6.9-20100615.074507-2.jar groovy.ui.Console works on java -version java version "1.4.2_19" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_19-b04) Java HotSpot(TM) Client VM (build 1.4.2_19-b04, mixed mode) So I think you have fixed the problem - thanks!
        Hide
        Guillaume Laforge added a comment -

        Great news, SebbASF, thank you for your feedback and testing this snapshot.
        Now, time to find a suitable date for the release.

        Show
        Guillaume Laforge added a comment - Great news, SebbASF, thank you for your feedback and testing this snapshot. Now, time to find a suitable date for the release.

          People

          • Assignee:
            Paul King
            Reporter:
            SebbASF
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: