Friday, 8 January 2010

Upgrading to Grails 1.2

We have recently upgraded two of our main projects from Grails 1.1.2 to Grails 1.2.0, which for the most part went very smoothly.

However, we did notice a couple of oddities with one of the projects:

  • The main index.html page contained code similar to the following:

    <g:isNotLoggedIn>
    ${response.sendRedirect(createLink(controller: 'login', action: 'auth')}
    </g:isNotLoggedIn>

    This was throwing an exception for some strange reason, which we traced to the createLink() tag library - we solved the problem by replacing the createLink() with a string:

    <g:isnotloggedin>
    ${response.sendRedirect('login/auth')}
    </g:isnotloggedin>

    Although not particularly elegant, it solved the problem - perhaps someone can suggest why createLink() should have stopped working?

  • The other problem we encountered was when trying to untar a TAR'd file, which resulting in a ClassNotFoundException. It turns out that this library was provided through ant-1.7.0.jar which was part of the Grails 1.1.2 distribution, but this no longer appears to be the case. Finding and adding ant-1.7.0.jar to the lib folder of our upgraded project solved the problem. Again, I'm not sure why this JAR has been dropped - perhaps someone can comment?

4 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete