Tuesday, June 12, 2007

Getting started with Grails

Finally, after spending a considerable amount of time trying get ride
of this ugly error while I'm trying to create my first Grails application:

Welcome to Grails 0.5 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: D:\Grails

Base Directory: D:\GrApp
Environment set to production
Note: No plugin scripts found
Running script D:\Grails\scripts\CreateApp.groovy
Error executing script CreateApp: Cannot invoke method addURL() on null object
java.lang.NullPointerException: Cannot invoke method addURL() on null object
at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:1
at org.codehaus.groovy.runtime.Invoker.invokePogoMethod(Invoker.java:148
at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:110)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.

Mr. Graeme Rocher came to rescue.
So, if you have GROOVY_HOME environment variable defined in your system and and you got that ugly error while you are trying to run Grails scripts, then remove the GROOVY_HOME environment variable.
Maybe you don't want to remove it completely, you can just "remove" it from your current console.
In MS Windows, you can use :


Enjoy your search of the Grails!

No comments: