Does IntelliJ support Grails 2.2?

Grails version 2.2 shipped just about a week back with support for Groovy 2.0. I tried upgrading my project, currently on 2.1.0, to 2.2 but was not able to run simple tests. Am I missing something or is Grails 2.2 and groovy 2.0 support still yet to come?

6 comments
Comment actions Permalink

When I try running grails run-app, the app launches successfully but I am unable to run any unit/integration tests. This is the error that I get.Am I missing something simple? I run Groovy 2.0 with Grails 2.2 on JDK 1.7.10.

Groovyc: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at org.jetbrains.groovy.grails.compiler.GrailsJUnitPatcher.patchCompilationUnit(GrailsJUnitPatcher.java:71)
    at org.jetbrains.groovy.compiler.rt.GroovycRunner.runPatchers(GroovycRunner.java:271)
    at org.jetbrains.groovy.compiler.rt.GroovycRunner.main(GroovycRunner.java:126)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:112)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
    at org.jetbrains.groovy.grails.compiler.GrailsJUnitPatcher.patchCompilationUnit(GrailsJUnitPatcher.java:62)
    ... 7 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:72)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:53)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:157)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:165)
    at org.codehaus.groovy.grails.plugins.GrailsPluginUtils.getPluginBuildSettings(GrailsPluginUtils.groovy:123)
    at org.codehaus.groovy.grails.plugins.GrailsPluginUtils.getPluginBuildSettings(GrailsPluginUtils.groovy)
    at org.codehaus.groovy.grails.compiler.injection.PluginAwareAstTransformer.<init>(PluginAwareAstTransformer.java:44)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
    at java.lang.Class.newInstance0(Class.java:372)
    at java.lang.Class.newInstance(Class.java:325)
    at org.codehaus.groovy.grails.compiler.injection.GrailsAwareInjectionOperation.initializeState(GrailsAwareInjectionOperation.java:101)
    at org.codehaus.groovy.grails.compiler.injection.GrailsAwareInjectionOperation.<init>(GrailsAwareInjectionOperation.java:53)
    at org.codehaus.groovy.grails.compiler.injection.GrailsAwareInjectionOperation.<init>(GrailsAwareInjectionOperation.java:57)
    ... 12 more

0
Comment actions Permalink

Hi Ritesh,

Asked our grails guy to have a look here.

Denis

0
Comment actions Permalink

Can't reproduce. What is your OS?
Do you have this problem on new empty Grails project?

0
Comment actions Permalink

We were able to figure out why it was happening. Grails 2.2 packages Groovy version 2.0.5 but we had a transitive dependency for Groovy 2.0.6 coming in. Turns out two versions of Groovy in IDEA don't play nice with each other. If we figure out there is something more to this,  I will update this thread with the solution.

0
Comment actions Permalink

I am afraid the problem is still there. To be more specific, this affects not just tests, but the overall 'Make' goal.

Our project uses Groovy 2.1.3, so I guess this dependency is inherited in the Grails module. It may conflict with the one used by Grails.

I would appreciate investigating this.

0

Please sign in to leave a comment.