Rake in Eclipse

I'm trying to follow some introduction to the Grails tutorials and I'm where I want to try and figure out if I can use the debugger in Eclipse with my Grails applications. The grails app works fine when I use the command to execute, but when I tried to use the Eclipse run configuration I get the following error:

Exception in thread "main" java.lang.NullPointerException
at java.io.File.<init>(File.java:194)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:107)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:192)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:200)
at grails.util.GrailsMain.run(GrailsMain.groovy:27)
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:585)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1062)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:893)
at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:744)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:727)
at org.codehaus.groovy.runtime.InvokerHelper.runScript(InvokerHelper.java:383)
at org.codehaus.groovy.runtime.InvokerHelper$runScript.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:129)
at grails.util.GrailsMain.main(GrailsMain.groovy)

      

I believe this is a configuration issue (I recently set the GRAILS_HOME environment variable and it seems to be correct), but this error message doesn't give me much.

Suggestions?

+2


source to share


5 answers


I've never been able to get grails to work properly in eclipse. You can try Netbeans, although version 6.7 has improved Grails support.



0


source


Grails works in Eclipse. Based on my observations, I would say this is the preferred Grails development environment (ok the STS version).

A) You can install the Eclipse groovy plugin. Might be a little confusing http://groovy.codehaus.org/Eclipse+Plugin

B) Or you could use the Spring IDE Toolkit (STS) and install Grails support from the extensions menu. http://grails.org/STS+Integration (just works!)



STS is built on Eclipse

I personally found STS to have better Grails support than Netbeans. It's developed by the same organization that maintains Grails

+5


source


Have you installed the Groovy Eclipse plugin?

IIRC, you need this to enable Groovy debugging - take a look at this page step by step about setting up the eclipse debugger - http://www.grails.org/Eclipse+IDE+Integration

But Jared is right, Netbeans step debugger is much nicer --- http://www.grailsblog.com/archive/show?id=13

+1


source


Besides the Grails role, try setting the JAVA_HOME environment variable.

+1


source


We are using Groovy / Grails Tool Suite IDE. It is similar to the Spring Tool Suite (STS) in that it is based on Eclipse, but GGTS comes bundled with the Grails distribution and tools for Eclipse so there is no extra step required to get any plugins.

0


source







All Articles