Yesterday, for example, I hit a snag building an application running the grails command app-engine. This was a new problem. The app had been built and run successfully prior to this. The only difference is that I added a new domain class, a new controller and a few new views to support the new domain class to the project. The ant task that the Google App Engine SDK provides in the file config\user\ant-macros.xml was blowing up in the Datanucleus Enhancement phase because the parameter it created to feed to the enhancer included all the classes in the war and its length exceeded the max path length allowed by Windows. I finally got around the problem by modifying the ant script to only include the application's domain objects and I was able to build and run the project again. The problem here is that this isn't documented and it literally took me hours to find a blog post that provided the solution.
By the way, my environment is set up to use Grails 1.1.1 and not the latest 1.2 because the app-engine plugin doesn't yet support it. I am using GORM-Jpa as well.
GORM-Jpa plugin is another point of frustration. It claims to provide dynamic finder support but in reality it only provides a very limited subset. The experience of determining what finders it actually supports is again like groping around in the dark. What I have learned so far is to limit my queries with
Developing for the App Engine with Grails is very fragile. A lot of things that you just take for granted in Grails just do not work or work differently. This is in part due to the immaturity of the Java App Engine api as well as Grails App Engine support. I hope to see both mature rapidly :) And thank heavens for Netbeans' Grails support. I'd have gotten nowhere fast if it weren't for Netbeans' ability to debug Grails apps.
So, if you have any gems you'd care to share on Grails on Google App Engine please do it here. It might save me and many others some bruises as well. And, likewise, I will share with you what I learn as I grope my way around in the darkness of Grails and Google App Engine.
Grope... bump... ouch! Grope... bump... ouch! ...
I probably should have posted this sooner but I have given up with Grail on AppEngine and switched to Gaelyk which was purposely designed to be light weight and run on top of Google's AppEngine. It doesn't have all the bells and wistles that Grails has but you really don't need them for AppEngine. JDO/JPA just gets in the way and really doesn't fit with the BigTable database so why use it. Gaelyk comes with some very nice wrappers for Google's cloud apis and are extremely easy to work with. Startup times for Grails apps on AppEngine are horrendous and unacceptable whereas Gaelyk apps don't suffer the same startup latency. And the best thing about Gaelyk is that it is Groovy which means you still have access to litterally thousands of open source libraries at your disposal. Grails on AppEngine is like trying to run a Rolls Royce in a Nascar race where Gaelyk on AppEngine is like a speedy agile little sports car. Gaelyk support is fantastic. Guillaume Laforge, who is the Groovy project manager and head of groovy development at SpringSource is one of Gaelyk's primary developers. He is very committed to the project and I have found him to be extremely responsive to emails posted on the Gaelyk users group.
So the bottom lines my friends is this, if you are writing an app for a typical servelet environment then go with Grails. It is a fabulous framework. But forget about it on AppEngine, it just doesn't fit.