Oracle backing Grails framework

The first heavyweight to announce their support for Grails, Oracle have annouced that they will be supporting Groovy and Grails, and the JSR 223 spec for supporting scriting languages on the VM.

Even if Grails never attracts the momentum to take it into mainstream usage, there are plenty of lessons to be learnt from the simplified approach and coding by convention approach introduced by Ruby on Rails. From my personal usage so far on a small project implementing an Online Store application, I have to say that in comparison to a traditional J2EE layered application the increase in productivity from the simplified approach is amazing. I am completely sold on the idea so far – it’s a refreshing change to be able to achieve so much with so little code. If you haven’t seen Grails yet I encourage you to check it out at their website, www.grails.org, download it and try it out for yourself. Before trying Grails I had been reading various articles on Ruby on Rails, but didn’t truely appreciate how easy this approach makes developing web apps until I tried it for myself.

Fun with Unified Class Loader on JBoss with Grails web-app deployments

I have just been caught out by the Unified Class Loader approach on JBoss 4.0.x. I have a 4.0.1 server running a couple of differnt webapps, and each is packaged with their own jars in WEB-INF/lib.

On attempting to deploy a test Grails app to the same server, I ran into all sorts of MethodNotFoundException, and JSP compilation issues that had me scratching my head for a while. I tried removing older copies of Jars like commons.lang.jar from the already deployed (older) web apps, as most of the issues were to do with new methods added in the later version of commons-lang, but no luck.

I finally stumbled across the solution – to disable the Unified Class Loader in JBoss, so that each web app would be self contained. This fixed my issues.

I changed this file:

<code>
/jboss/server/default/deploy/jbossweb-tomcat50.sar/jboss-service.xml
</code>

changing this line:

<code>
&lt;attribute name="UseJBossWebLoader"&gt;true&lt;/attribute&gt;
</code>

to

<code>
&lt;attribute name="UseJBossWebLoader"&gt;false&lt;/attribute&gt;
</code>

For exact details of the errors, check out the JIRA entries I created (and subsequently closed):

http://jira.codehaus.org/browse/GRAILS-158

http://jira.codehaus.org/browse/GRAILS-160