IJ 12 - groovyc - asm - compilation broken
Hi all,
Just upgraded from IJ 11 to 12. Worked like a charm. Maven project import worked nice and fast. Maven build totally ok (using groovy-eclipse-compiler).
Here's my problem: compilation with IJ12 does not work anymore (worked fine with IJ11). I'll paste the error completely at the end.
My project depends on asm-3.1 but from the error it seems to me groovyc can't find the ClassAdapter class. Now I saw the lib dir contains asm4-all.jar but also asm.jar (which is smaller). Could this explain why the ClassAdapter can't be found? It seems like groovyc does not know about the dependencies of my project. The modules dependencies look correct to me (definitely not empty). Is there a way to increase the amount of debugging info in the message panel? It quite terse right now.
I'll must add that I use groovy 2.0.4 (did that too with IJ 11) and always get the next warning. Now I believe it has more to do with my maven project, but I have to ask. Is there a way to impose the use of groovy 2 ?
Groovyc: The global transform for class groovy.grape.GrabAnnotationTransformation is defined in both jar:file:/C:/Documents%20and%20Settings/XYZ/.m2/repository/org/codehaus/groovy/groovy-all/2.0.4/groovy-all-2.0.4.jar!/META-INF/services/org.codehaus.groovy.transform.ASTTransformation and jar:file:/C:/Documents%20and%20Settings/XYZ/.m2/repository/org/codehaus/groovy/groovy/1.7.11/groovy-1.7.11.jar!/META-INF/services/org.codehaus.groovy.transform.ASTTransformation - the former definition will be used and the latter ignored.
Any pointer would be much appreciated.
Best regards,
Johan
ERROR message:
Groovyc: BUG! exception in phase 'semantic analysis' in source unit 'C:\Documents and Settings\XYZ............\JarFileInfo.groovy' Problem loading class org.objectweb.asm.ClassAdapter
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:907)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:566)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:515)
at org.jetbrains.groovy.compiler.rt.GroovyCompilerWrapper.compile(GroovyCompilerWrapper.java:44)
at org.jetbrains.groovy.compiler.rt.GroovycRunner.main(GroovycRunner.java:129)
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 com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:112)
Caused by: java.lang.RuntimeException: Problem loading class org.objectweb.asm.ClassAdapter
at org.jetbrains.groovy.compiler.rt.GroovycRunner$7$1.loadClass(GroovycRunner.java:487)
at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:183)
at org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:168)
at org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:124)
at org.codehaus.groovy.control.ResolveVisitor.resolveToOuter(ResolveVisitor.java:616)
at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:268)
at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1133)
at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:141)
at org.codehaus.groovy.control.CompilationUnit$9.call(CompilationUnit.java:624)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:903)
... 9 more
Caused by: java.lang.IncompatibleClassChangeError: Implementing class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
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 java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:648)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:516)
at org.jetbrains.groovy.compiler.rt.GroovycRunner$7$1.loadClass(GroovycRunner.java:481)
... 18 more
请先登录再写评论。
Hi, please vote/watch http://youtrack.jetbrains.com/issue/IDEA-97781, it looks quite similar to your issue.
Done, thanks!
You might also want to answer the questions in comments to help us to find and fix the issue :)