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

Groovy-all-jdk14-1.6.5 not usable - java/util/concurrent/locks/AbstractQueuedSynchronizer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Not A Problem
    • 1.6.5
    • 1.6.6
    • groovy-jdk
    • None
    • JDK 1.4

    Description

      When trying to use backported version of the Groovy on JDK14 platform I am getting exception:

      Caused by: 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:158)
      at org.codehaus.groovy.control.CompilationUnit.<init>(CompilationUnit.java:177)
      at org.codehaus.groovy.control.CompilationUnit.<init>(CompilationUnit.java:116)
      at groovy.lang.GroovyClassLoader.createCompilationUnit(GroovyClassLoader.java:443)
      at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:266)
      at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:249)
      at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:244)
      at groovy.util.GroovyScriptEngine.parseScript(GroovyScriptEngine.java:330)
      at groovy.util.GroovyScriptEngine.updateCacheEntry(GroovyScriptEngine.java:315)
      at groovy.util.GroovyScriptEngine.loadScriptByName(GroovyScriptEngine.java:271)
      at com.fg.scripting.groovy.DevelopmentGroovyFactory.loadClass(DevelopmentGroovyFactory.java:220)
      at com.fg.scripting.groovy.DevelopmentGroovyFactory.createInstance(DevelopmentGroovyFactory.java:119)
      at com.fg.webapp.cps.v1.action.ClassUtil.getClassInstance(ClassUtil.java:74)
      at com.fg.webapp.cps.v1.core.macros.CustomAction.getCustomActionClass(CustomAction.java:113)
      at com.fg.webapp.cps.v1.core.macros.CustomAction.processAction(CustomAction.java:84)
      at com.fg.webapp.cps.v1.core.macros.Action.process(Action.java:128)
      ... 27 more

      Seems that this issue was already discussed in mail thread: http://marc.info/?l=groovy-dev&m=120685075128853&w=2
      But in the latest version it still occurs! Problem lies in class:

      groovy-all-jdk14-1.6.5.jar\groovyjarjarbackport\java\util\concurrent\locks\ReentrantLock.class

      That if opened has in itself:

      groovyjarjarbackport/java/util/concurrent/locks/ReentrantLock 5java/util/concurrent/locks/AbstractQueuedSynchronizer LockableObject.java owner Ljava/lang/Thread; <init> ()V

      this ?Lgroovyjarjarbackport/java/util/concurrent/locks/ReentrantLock; isHeldExclusively ()Z getState ()I
      java/lang/Thread
      currentThread ()Ljava/lang/Thread;
      lock compareAndSetState (II)Z
      acquire (I)V ! "

      1. unlock release (I)Z & '
        (
        tryAcquire setState + "
        , acquires I current c
        tryRelease &java/lang/IllegalMonitorStateException 3
        4
        releases free Z Code LocalVariableTable LineNumberTable
        SourceFile !

      So that means that backport is sttill unusable.

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            helm helm
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: