Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.8.0
-
None
Description
Running "Inspect Ast" (Ctrl-T) throws the below exception. The AST browser still opens and looks like usable. This only happens in Groovy 1.8.
Exception in thread "Thread-4" org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.LinkageError: loader (instance of org/codehaus/groovy/tools/RootLoader): attempted duplicate class definition for name: "groovy/grape/GrabAnnotationTransformation" at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:97) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:885) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:929) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:885) at groovy.lang.Closure.call(Closure.java:405) at groovy.lang.Closure.call(Closure.java:399) at groovy.lang.Closure.run(Closure.java:483) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.LinkageError: loader (instance of org/codehaus/groovy/tools/RootLoader): attempted duplicate class definition for name: "groovy/grape/GrabAnnotationTransformation" at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) at java.lang.ClassLoader.defineClass(ClassLoader.java:616) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at org.codehaus.groovy.tools.RootLoader.oldFindClass(RootLoader.java:152) at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:124) at java.lang.ClassLoader.loadClass(ClassLoader.java:296) at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:696) at org.codehaus.groovy.transform.ASTTransformationVisitor.addPhaseOperationsForGlobalTransforms(ASTTransformationVisitor.java:285) at org.codehaus.groovy.transform.ASTTransformationVisitor.doAddGlobalTransforms(ASTTransformationVisitor.java:266) at org.codehaus.groovy.transform.ASTTransformationVisitor.addGlobalTransforms(ASTTransformationVisitor.java:187) at org.codehaus.groovy.transform.ASTTransformationVisitor.addPhaseOperations(ASTTransformationVisitor.java:150) at org.codehaus.groovy.control.CompilationUnit.<init>(CompilationUnit.java:188) at org.codehaus.groovy.control.CompilationUnit.<init>(CompilationUnit.java:120) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:54) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:198) at groovy.inspect.swingui.AstNodeToScriptAdapter.compileToScript(AstNodeToScriptAdapter.groovy:90) at groovy.inspect.swingui.AstNodeToScriptAdapter$compileToScript.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at groovy.inspect.swingui.AstBrowser$_decompile_closure6.doCall(AstBrowser.groovy:269) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) ... 9 more
I also had problems that the tree view in the AST browser was not showing anything due to NoClassDefFound execptions for Swing classes but I cannot reproduce this at the moment.