IDEA plugin frustrations

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

IDEA plugin frustrations

Marc Palmer Local

Hi,

The more I use the GroovyJ plugin for IDEA the more frustrated I  
become. It seems to be causing all kinds of strange exceptions in  
IDEA, in particular some that stop it compiling/building WAR/exploded  
dirs properly which took a long time to track down.

Basically, if I deliberately exclude any Groovy scripts from the  
project things work fine. If I include any groovy scripts (so I can  
run groovy unit tests in the IDE), I start getting exceptions in IDEA  
and things start breaking. Code won't compile because depenencies  
don't exist (I presume because builds are failing) etc.

Is this because I am using JRS snapshot 05 and something has changed  
that GroovyJ relies on? Is there an updated IDEA plugin for snapshot 05?

Exception example:

Original exception: org.codehaus.groovy.control.CompilationUnit.<init>
(Lorg/codehaus/groovy/control/CompilerConfiguration;Ljava/security/
CodeSource;Ljava/lang/ClassLoader;)V
java.lang.NoSuchMethodError:  
org.codehaus.groovy.control.CompilationUnit.<init>(Lorg/codehaus/
groovy/control/CompilerConfiguration;Ljava/security/CodeSource;Ljava/
lang/ClassLoader;)V
        at  
org.codehaus.groovy.intellij.compiler.GroovyCompiler.createCompilationUn
it(GroovyCompiler.java:137)
        at  
org.codehaus.groovy.intellij.compiler.GroovyCompiler.createCompilationUn
its(GroovyCompiler.java:116)
        at  
org.codehaus.groovy.intellij.compiler.GroovyCompiler.findOrCreateCompila
tionUnits(GroovyCompiler.java:110)
        at  
org.codehaus.groovy.intellij.compiler.GroovyCompiler.mapModulesToSourceA
ndTestCompilationUnits(GroovyCompiler.java:96)
        at org.codehaus.groovy.intellij.compiler.GroovyCompiler.compile
(GroovyCompiler.java:82)
        at org.codehaus.groovy.intellij.compiler.GroovyCompiler.access$000
(GroovyCompiler.java:49)
        at org.codehaus.groovy.intellij.compiler.GroovyCompiler$1.run
(GroovyCompiler.java:73)
        at  
com.intellij.openapi.application.impl.ApplicationImpl.runReadAction
(ApplicationImpl.java:153)
        at org.codehaus.groovy.intellij.compiler.GroovyCompiler.compile
(GroovyCompiler.java:71)
        at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:336)
        at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:78)
        at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:385)
        at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:176)
        at com.intellij.compiler.impl.CompileDriver.access$400
(CompileDriver.java:1)
        at com.intellij.compiler.impl.CompileDriver$4$1.run
(CompileDriver.java:9)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess
(ProgressManagerImpl.java:6)
        at com.intellij.compiler.impl.CompileDriver$4.run(CompileDriver.java:3)



java.lang.RuntimeException: java.lang.NoSuchMethodError:  
org.codehaus.groovy.control.CompilationUnit.<init>(Lorg/codehaus/
groovy/control/CompilerConfiguration;Ljava/security/CodeSource;Ljava/
lang/ClassLoader;)V
        at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:468)
        at com.intellij.compiler.impl.CompileDriver.access$400
(CompileDriver.java:1)
        at com.intellij.compiler.impl.CompileDriver$4$1.run
(CompileDriver.java:9)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess
(ProgressManagerImpl.java:6)
        at com.intellij.compiler.impl.CompileDriver$4.run(CompileDriver.java:3)
Caused by: java.lang.NoSuchMethodError:  
org.codehaus.groovy.control.CompilationUnit.<init>(Lorg/codehaus/
groovy/control/CompilerConfiguration;Ljava/security/CodeSource;Ljava/
lang/ClassLoader;)V
        at  
org.codehaus.groovy.intellij.compiler.GroovyCompiler.createCompilationUn
it(GroovyCompiler.java:137)
        at  
org.codehaus.groovy.intellij.compiler.GroovyCompiler.createCompilationUn
its(GroovyCompiler.java:116)
        at  
org.codehaus.groovy.intellij.compiler.GroovyCompiler.findOrCreateCompila
tionUnits(GroovyCompiler.java:110)
        at  
org.codehaus.groovy.intellij.compiler.GroovyCompiler.mapModulesToSourceA
ndTestCompilationUnits(GroovyCompiler.java:96)
        at org.codehaus.groovy.intellij.compiler.GroovyCompiler.compile
(GroovyCompiler.java:82)
        at org.codehaus.groovy.intellij.compiler.GroovyCompiler.access$000
(GroovyCompiler.java:49)
        at org.codehaus.groovy.intellij.compiler.GroovyCompiler$1.run
(GroovyCompiler.java:73)
        at  
com.intellij.openapi.application.impl.ApplicationImpl.runReadAction
(ApplicationImpl.java:153)
        at org.codehaus.groovy.intellij.compiler.GroovyCompiler.compile
(GroovyCompiler.java:71)
        at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:336)
        at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:78)
        at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:385)
        at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:176)
        ... 4 more




~ ~ ~
Marc Palmer ([hidden email])
Consultant/Analyst
AnyWare Ltd.
http://www.anyware.co.uk/

Reply | Threaded
Open this post in threaded view
|

RE: IDEA plugin frustrations

Dierk König
Hi Marc,

your experience surprises me since I use the plugin every day and
it works fine for me.
What IDEA and plugin version are you using?
Do you install manually or via the IDEA's integrated update mechano?
I always use the latter.

cheers
Mittie

> -----Original Message-----
> From: Marc Palmer [mailto:[hidden email]]
> Sent: Montag, 12. Dezember 2005 12:14
> To: [hidden email]
> Subject: [groovy-user] IDEA plugin frustrations
>
>
>
> Hi,
>
> The more I use the GroovyJ plugin for IDEA the more frustrated I  
> become. It seems to be causing all kinds of strange exceptions in  
> IDEA, in particular some that stop it compiling/building WAR/exploded  
> dirs properly which took a long time to track down.
>
> Basically, if I deliberately exclude any Groovy scripts from the  
> project things work fine. If I include any groovy scripts (so I can  
> run groovy unit tests in the IDE), I start getting exceptions in IDEA  
> and things start breaking. Code won't compile because depenencies  
> don't exist (I presume because builds are failing) etc.
>
> Is this because I am using JRS snapshot 05 and something has changed  
> that GroovyJ relies on? Is there an updated IDEA plugin for snapshot 05?
>
> Exception example:
>
> Original exception: org.codehaus.groovy.control.CompilationUnit.<init>
> (Lorg/codehaus/groovy/control/CompilerConfiguration;Ljava/security/
> CodeSource;Ljava/lang/ClassLoader;)V
> java.lang.NoSuchMethodError:  
> org.codehaus.groovy.control.CompilationUnit.<init>(Lorg/codehaus/
> groovy/control/CompilerConfiguration;Ljava/security/CodeSource;Ljava/
> lang/ClassLoader;)V
> at  
> org.codehaus.groovy.intellij.compiler.GroovyCompiler.createCompilationUn
> it(GroovyCompiler.java:137)
> at  
> org.codehaus.groovy.intellij.compiler.GroovyCompiler.createCompilationUn
> its(GroovyCompiler.java:116)
> at  
> org.codehaus.groovy.intellij.compiler.GroovyCompiler.findOrCreateCompila
> tionUnits(GroovyCompiler.java:110)
> at  
> org.codehaus.groovy.intellij.compiler.GroovyCompiler.mapModulesToSourceA
> ndTestCompilationUnits(GroovyCompiler.java:96)
> at org.codehaus.groovy.intellij.compiler.GroovyCompiler.compile
> (GroovyCompiler.java:82)
> at org.codehaus.groovy.intellij.compiler.GroovyCompiler.access$000
> (GroovyCompiler.java:49)
> at org.codehaus.groovy.intellij.compiler.GroovyCompiler$1.run
> (GroovyCompiler.java:73)
> at  
> com.intellij.openapi.application.impl.ApplicationImpl.runReadAction
> (ApplicationImpl.java:153)
> at org.codehaus.groovy.intellij.compiler.GroovyCompiler.compile
> (GroovyCompiler.java:71)
> at
> com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:336)
> at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:78)
> at
> com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:385)
> at
> com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:176)
> at com.intellij.compiler.impl.CompileDriver.access$400
> (CompileDriver.java:1)
> at com.intellij.compiler.impl.CompileDriver$4$1.run
> (CompileDriver.java:9)
> at
> com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess
> (ProgressManagerImpl.java:6)
> at
> com.intellij.compiler.impl.CompileDriver$4.run(CompileDriver.java:3)
>
>
>
> java.lang.RuntimeException: java.lang.NoSuchMethodError:  
> org.codehaus.groovy.control.CompilationUnit.<init>(Lorg/codehaus/
> groovy/control/CompilerConfiguration;Ljava/security/CodeSource;Ljava/
> lang/ClassLoader;)V
> at
> com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:468)
> at com.intellij.compiler.impl.CompileDriver.access$400
> (CompileDriver.java:1)
> at com.intellij.compiler.impl.CompileDriver$4$1.run
> (CompileDriver.java:9)
> at
> com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess
> (ProgressManagerImpl.java:6)
> at
> com.intellij.compiler.impl.CompileDriver$4.run(CompileDriver.java:3)
> Caused by: java.lang.NoSuchMethodError:  
> org.codehaus.groovy.control.CompilationUnit.<init>(Lorg/codehaus/
> groovy/control/CompilerConfiguration;Ljava/security/CodeSource;Ljava/
> lang/ClassLoader;)V
> at  
> org.codehaus.groovy.intellij.compiler.GroovyCompiler.createCompilationUn
> it(GroovyCompiler.java:137)
> at  
> org.codehaus.groovy.intellij.compiler.GroovyCompiler.createCompilationUn
> its(GroovyCompiler.java:116)
> at  
> org.codehaus.groovy.intellij.compiler.GroovyCompiler.findOrCreateCompila
> tionUnits(GroovyCompiler.java:110)
> at  
> org.codehaus.groovy.intellij.compiler.GroovyCompiler.mapModulesToSourceA
> ndTestCompilationUnits(GroovyCompiler.java:96)
> at org.codehaus.groovy.intellij.compiler.GroovyCompiler.compile
> (GroovyCompiler.java:82)
> at org.codehaus.groovy.intellij.compiler.GroovyCompiler.access$000
> (GroovyCompiler.java:49)
> at org.codehaus.groovy.intellij.compiler.GroovyCompiler$1.run
> (GroovyCompiler.java:73)
> at  
> com.intellij.openapi.application.impl.ApplicationImpl.runReadAction
> (ApplicationImpl.java:153)
> at org.codehaus.groovy.intellij.compiler.GroovyCompiler.compile
> (GroovyCompiler.java:71)
> at
> com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:336)
> at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:78)
> at
> com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:385)
> at
> com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:176)
> ... 4 more
>
>
>
>
> ~ ~ ~
> Marc Palmer ([hidden email])
> Consultant/Analyst
> AnyWare Ltd.
> http://www.anyware.co.uk/
Reply | Threaded
Open this post in threaded view
|

Re: IDEA plugin frustrations

Guillaume Laforge
Administrator
In reply to this post by Marc Palmer Local
Hello Marc,

As far as I know, those problems should be fixed in CVS Head, and
there should soon be a new release of the IDEA plugin. So... stay
tuned :-)

In the meantime, you should stick with the current version, and not
use a Groovy snapshot unsupported by the IDEA plugin. Otherwise, use
at your own risk.

Guillaume

On 12/12/05, Marc Palmer <[hidden email]> wrote:

>
> Hi,
>
> The more I use the GroovyJ plugin for IDEA the more frustrated I
> become. It seems to be causing all kinds of strange exceptions in
> IDEA, in particular some that stop it compiling/building WAR/exploded
> dirs properly which took a long time to track down.
>
> Basically, if I deliberately exclude any Groovy scripts from the
> project things work fine. If I include any groovy scripts (so I can
> run groovy unit tests in the IDE), I start getting exceptions in IDEA
> and things start breaking. Code won't compile because depenencies
> don't exist (I presume because builds are failing) etc.
>
> Is this because I am using JRS snapshot 05 and something has changed
> that GroovyJ relies on? Is there an updated IDEA plugin for snapshot 05?
> [snip]

--
Guillaume Laforge
Groovy Project Manager
http://glaforge.free.fr/blog/groovy
Reply | Threaded
Open this post in threaded view
|

Re: IDEA plugin frustrations

Marc Palmer Local

On 12 Dec 2005, at 12:14, Guillaume Laforge wrote:

> Hello Marc,
>
> As far as I know, those problems should be fixed in CVS Head, and
> there should soon be a new release of the IDEA plugin. So... stay
> tuned :-)
>
> In the meantime, you should stick with the current version, and not
> use a Groovy snapshot unsupported by the IDEA plugin. Otherwise, use
> at your own risk.

Tell me about it - life at the bleeding edge :(

I want to use snapshot 05 though because of snapshot 04's problem  
with Groovy classes extending other Groovy classes - without that  
it's nasty trying to make test cases that inherit common test  
functionality.

Anyway, I'll revert my IDEA plugin's groovy jar (but not my project's  
one which needs the fix I submitted for loading from multiple roots)  
and see what happens.

cheers

~ ~ ~
Marc Palmer ([hidden email])
Consultant/Analyst
AnyWare Ltd.
http://www.anyware.co.uk/

Reply | Threaded
Open this post in threaded view
|

Re: IDEA plugin frustrations

Franck Rasolo
Marc,

I've just released a new version of GroovyJ that you can download using IDEA's
plug-in manager. No fix other than recompiling the plug-in against the Groovy
JSR-05 snapshot was required to address your issue.

Let us know how this works for you.

Regards,

Franck

--- Marc Palmer <[hidden email]> wrote:

>
> On 12 Dec 2005, at 12:14, Guillaume Laforge wrote:
>
> > Hello Marc,
> >
> > As far as I know, those problems should be fixed in CVS Head, and
> > there should soon be a new release of the IDEA plugin. So... stay
> > tuned :-)
> >
> > In the meantime, you should stick with the current version, and not
> > use a Groovy snapshot unsupported by the IDEA plugin. Otherwise, use
> > at your own risk.
>
> Tell me about it - life at the bleeding edge :(
>
> I want to use snapshot 05 though because of snapshot 04's problem  
> with Groovy classes extending other Groovy classes - without that  
> it's nasty trying to make test cases that inherit common test  
> functionality.
>
> Anyway, I'll revert my IDEA plugin's groovy jar (but not my project's  
> one which needs the fix I submitted for loading from multiple roots)  
> and see what happens.
>
> cheers
>
> ~ ~ ~
> Marc Palmer ([hidden email])
> Consultant/Analyst
> AnyWare Ltd.
> http://www.anyware.co.uk/

Reply | Threaded
Open this post in threaded view
|

Re: IDEA plugin frustrations

Marc Palmer Local

On 13 Dec 2005, at 01:09, Franck Rasolo wrote:

> Marc,
>
> I've just released a new version of GroovyJ that you can download  
> using IDEA's
> plug-in manager. No fix other than recompiling the plug-in against  
> the Groovy
> JSR-05 snapshot was required to address your issue.
>
> Let us know how this works for you.

When I try to run a script in the IDE I get:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
commons/cli/ParseException
        at groovy.lang.GroovyShell.main(GroovyShell.java:121)

:(

Incompatible commons-cli version? The plugin's dir has:

commons-cli-1.0.jar
groovy-all-1.0-jsr-05-SNAPSHOT.jar
groovyj-0.1.6-irida.jar


~ ~ ~
Marc Palmer ([hidden email])
Consultant/Analyst
AnyWare Ltd.
http://www.anyware.co.uk/

Reply | Threaded
Open this post in threaded view
|

Re: IDEA plugin frustrations

Marc Palmer Local
In reply to this post by Franck Rasolo

On 13 Dec 2005, at 01:09, Franck Rasolo wrote:

> Marc,
>
> I've just released a new version of GroovyJ that you can download  
> using IDEA's
> plug-in manager. No fix other than recompiling the plug-in against  
> the Groovy
> JSR-05 snapshot was required to address your issue.
>
> Let us know how this works for you.

Update: updating the GroovyJ plugin now works. However IDEA holds  
onto the previous plugin's global library info in your project.

I went to the project settings -> Global Libraries and saw the old  
(no longer existing) global library for GroovyJ ticked and the new  
one not ticked. Fixed that and its all ok now.

Thank you Franck.

Now if only I had time to raise a Jira against IDEA to facilitate  
global library upgrades to projects...

~ ~ ~
Marc Palmer ([hidden email])
Consultant/Analyst
AnyWare Ltd.
http://www.anyware.co.uk/

Reply | Threaded
Open this post in threaded view
|

Re: IDEA plugin frustrations

Franck Rasolo
Actually, IDEA already has the API for doing exactly that. Alas, I can confirm
that the automatic upgrade of the Groovy global library is still rough around
the edges, see:

http://cvs.groovy.codehaus.org/viewrep/groovy/groovy/ide/groovyj/src/java/org/codehaus/groovy/intellij/GroovyLibraryManager.java?r=HEAD#l37

so please go ahead and file a bug against GroovyJ in JIRA.

Thanks for your feedback!

Cheers
Franck

--- Marc Palmer <[hidden email]> wrote:

> Update: updating the GroovyJ plugin now works. However IDEA
> holds onto the previous plugin's global library info in your
> project.
>
> I went to the project settings -> Global Libraries and saw the
> old (no longer existing) global library for GroovyJ ticked and
> the new one not ticked. Fixed that and its all ok now.
>
> Thank you Franck.
>
> Now if only I had time to raise a Jira against IDEA to
> facilitate global library upgrades to projects...
>
> ~ ~ ~
> Marc Palmer ([hidden email])
> Consultant/Analyst
> AnyWare Ltd.
> http://www.anyware.co.uk/