T. Srik
T. Srik

Reputation: 59

Upgrading a Grails app from 1.3.7 to Java 8 compatibility version

I am looking to upgrade Grails from 1.3.7. Which version of grails is compatible with Java8? What versions of hibernate and tomcat plugins to be used?

Upvotes: 5

Views: 1766

Answers (2)

Sharad Gaikwad
Sharad Gaikwad

Reputation: 56

Which version of grails is compatible with Java8?

I upgraded to 2.3.10 with JDK 1.8 successfully in two steps.

  • I first tried to upgrade it to version 2.0.5 from 1.3.7. (Note earlier vesions of grails support upgrade command which helps to upgrade few things automatically).

    Remember there will be some changes in Application

    1. AppplicationContext.xml will have some changes.

    2. The class org.codehaus.groovy.grails.commons.ConfigurationHolder is deprecated. Use below code

      def config = Holders.config 
      
  • In second step I migrated from version 2.0.5 to 2.3.10

What versions of hibernate and tomcat plugins to be used?

 runtime ':hibernate:3.6.10.16' // ':hibernate4:4.3.5.4' for Hibernate 4
 build ':tomcat:7.0.54'

Upvotes: 0

Jeff Scott Brown
Jeff Scott Brown

Reputation: 27200

Which version of grails is compatible with Java8?

Grails 2.5.x is the first version of Grails for which we officially support Java 8.

What versions of hibernate and tomcat plugins to be used?

Your options there will depend on which version of Grails you decide to use. If you are using Grails 2.5.6 then I would suggest :tomcat:7.0.70 and either :hibernate4:4.3.10 or :hibernate:3.6.10.18. With Grails 3 you have a wider array of options.

Upvotes: 3

Related Questions