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

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.