ALTERthought Blogs

31 July 2008

Grails 1.0.3 upgrade issues

Recently, we upgraded our application running in Grails 1.0.1 to 1.0.3. Just to give you an idea, the application is pretty complicated involving multiple data sources, complex hibernate mappings with JPA annotations, legacy system, linking tons of external services etc. We had to overcome few significant hurdles to get our application to run in Grails 1.0.3.

1. Update hibernate-entitymanager.jar (3.3.2 GA) in project/lib

2. Add hibernate-validator.jar (3.0.0 GA) in project/lib. Grails 1.0.1 did not require this jar

3. Changes to g:render taglib.
<g:render template=”templates/my_template.gsp” /> used to work in Grails 1.0.1 with template file in _templates/my_template.gsp under grails-app/views/mycontroller/. Now, for Grails 1.0.3 you need to have the template in template/_my_template.gsp.

4. Issues with domain properties.
my_domain.properties = another_domain.properties. This doesn’t work anymore in Grails 1.0.3, at least in some cases. Had to manually copy properties.

5. There are definitely issues with complex hibernate mapping involving legacy system. A particular hibernate relationship was throwing javax.persistence.PersistenceException with Grails 1.0.3. We couldn’t figure out the actual reason, had to make the relationship transient and manually manage it.

6. Changes to taglib g:actionSubmitImage. The following works fine in Grails 1.0.1.
<g:form name="myForm" action="myAction">
<g:actionSubmitImage value="Show" xsrc=".." mce_src=".." />
</g:form>

In Grails 1.0.3, you will need to change to <g:actionSubmitImage value=”Show” xsrc=”..” mce_src=”..” action=”myAction” />

7. Issues with blank spaces in directories in Windows: This is the nasty one and can drive you crazy. You may have problems running the app or executing tests. Errors such as java.util.zip.ZipException: The system cannot find the path specified or error trying to scan etc could be noticed. These errors are due to blank spaces in JAVA_HOME(c:\Program Files\..) and user.home (c:\Documents and Settings\..). To fix this:

Grails 1.0.3 seems much faster than Grails 1.0.1 and is probably worth the trouble.

Note: This post was originally posted in the author’s blog.

Technorati Tags: , , , , ,

    del.icio.us

2 Comments currently posted.

Geertjan says:

Yes, I’ve found Grails 1.0.3 to be MUCH faster.

Shawn Hartsock says:

I did this recently as well. I found it to be a noticeable speed boost. 1.0.3 it’s worth the effort.

Post a comment on this entry: