Upgrades are not always good… even for Grails
by steve on Oct.06, 2009, under Programming
I have had numerous Grails projects all written using 1.0. I have been itching to upgrade to 1.1. But as I do a project upgrade, a few of my plugins refuse to work with the new distribution.
Finally two new Grails projects! So I cleaned up my old desktop and downloaded the latest Grails release (Grails 1.1.1). I spent 3 hours digging through the new Grails website for plugins that I can use. I listed down a few promising ones (stark, export, grails UI, tomcat, etc)
So I gave it a test run! I made a sort of online reservation form with export to excel and pdf capability. Out of Grails 1.0 habit I did an upgrade command and to my surprised it failed! Nice! Some hibernate plugins can’t be deleted. Grails clean seems to work perfectly though.
Since my second and third try also failed, I manually deleted the project plugins @ .grails folder. The upgrade command worked this time. But I have to manually delete the plugins for the command to work. Ok no beggie!
So I spent a day testing some plugins. I love the Stark and Jasper plugins. Though you have to use IReport 2.x as the new IReport version does not work with the current jasper plugin. It seems that the jasper engine that grails uses only supports DTD. I did several workaround like adding the old doctype that the engine expects. So to avoid the same hair pulling misery that I had encountered stick with the old, ugly, dtd based IReport designer. Anyway as my journey continues, my small app was working nicely on my dev environment.
After downloading tomcat xampp add-on, we use xampp because we are lazy, I was ready to build my first Grails 1.1.1 war. I did a grails clean command this time via eclipse (ant task target:clean) which finished without a glitch. I wish I could say the same thing with war. Running the ant task gives me a java.lang.reflect.InvocationTargetException build error which usually occurs when the compiler sees 2 different classes with the same name. So again I deleted the plugins at .grails folder ran grails war this time via commandline and it worked! So again I tried running the ant task via IDE same error! Now call me crazy I did this several times and it gives me the same result.
No happy ending with this one. I am not sure if these are known issues and developers are doing workarounds. I have never experience these issues with the old Grails. Maven issues or perhaps plugin developers putting grails jar in their distributions? I don’t know… I am just a programmer.