IDEA hook: Grails not found!

Use case

While working with different grails versions and a maven repository in the background I faced some weird problems regarding version problems which IDEA was complaining about.

Incident

The stacktrace looked as follow:

[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] org.grails.maven.plugin.AbstractGrailsMojo.runGrailsInline(Ljava/lang/String;Ljava/lang/String;Z)V
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NoSuchMethodError: org.grails.maven.plugin.AbstractGrailsMojo.runGrailsInline(Ljava/lang/String;Ljava/lang/String;Z)V
	at org.grails.maven.plugin.GrailsExecMojo.execute(GrailsExecMojo.java:51)
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
	at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
	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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11 seconds
[INFO] Finished at: Wed Sep 05 10:44:12 CEST 2012
[INFO] Final Memory: 33M/743M
[INFO] ------------------------------------------------------------------------
java.lang.NullPointerException
	at org.jetbrains.groovy.grails.rt.Agent$2.run(Agent.java:99)
	at java.lang.Thread.run(Thread.java:662)

IDEA hook: Grails not found!

Neither grails clean, nor any re-builds vanished this problem.

Solution

After searching the web I could figure out that it has to with the JARs handling and cache of both grails and IDEA.

Finally, after removing the .ivy2- and maven-cache the problem did not occur anymore.

Posted in Grails, IntelliJ, Maven
One comment on “IDEA hook: Grails not found!
  1. It is pleasant to scan your post and you offer sensible info. If its all identical to you retain posting such quite illuminating stuff. attention-grabbing article share and this web log is motivates additional folks to examining that web log.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Anti-spam protection

Prove that you are Human by typing the emphasized characters:


Protected by Gab Captcha 2

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>