Home > Java > Grails and Eclipse

Grails and Eclipse

by paul on May 11, 2007

I’ve just been lead astray by a little problem with my Eclipse setup, while working on a Grails project. It’s documented that when working on a Grails project and using the Groovy Eclipse plugin, you must turn off ‘Enable Groovy Compiler Generating Classes’ otherwise it will interfere with your Grails project.

While working on a Groovy project I had re-enabled this, and after switching back to my Grails project, I would get this exception when running grails run-app :

Server failed to start:
org.mortbay.util.MultiException
[org.codehaus.groovy.runtime.InvokerInvocationException:
groovy.lang.MissingMethodException:
No signature of method:
Note.save() is applicable for argument types: () values: {}]

(Note.groovy is my domain class)

When I noticed a bunch of Eclipse generated content in the root of my project I quickly remembered this issue.

Since the setting in question is a workspace setting, I think the best solution for me would be to have separate workspaces for Groovy and Grails projects.

{ 3 comments… read them below or add one }

Alex June 14, 2007 at 2:47 am

No need for two worspaces at all. Just direct all your Eclipse plugin generated .class files to bin-groovy (you can enable this on the same page where you disabled the .classs generation).

Joe C March 15, 2008 at 12:48 am

Thank you Paul – I’d tried cleaning, but of course cleaning didn’t get rid of the pesky eclipse genrrated files. ‘deleted them from project root and all is well again!

Karataiev June 26, 2008 at 2:34 pm

Thanks a lot paul. It really helped me.

Cheers

Leave a Comment

Previous post:

Next post: