haxx populi

Grails 2.3.11 with Java8

by jja on
Topics:

Grails 2.3.11 (or any 2.3.x) does not work with Java8 (jdk1.8.0_40 or later). Following are some notes on how to get things working.

Edit: this information was originally documented in late 2015. While these issues may have since been resolved in later versions of Grails, because of the pain in upgrading to 2.4/2.5 or starting from scratch in 3.x, you may be stalled in 2.3.11.

Grails 2.3.11 includes Spring Loaded 1.2.0 which is incompatible with Java8. No fix is available until Grails 2.4.5 or even 2.5.1.

Download Spring Loaded 1.2.4:

Remove the old jars and .pom files and place the new files in their corresponding places under (as always, be careful of cut-n-paste linebreaks):

$GRAILS_HOME/lib/org.springframework/springloaded/

Rename and edit ivy-1.2.0.RELEASE.xml to reflect the new version number. Unfortunately, that's not enough because something still wants the 1.2.0 jar. So symlink that name:

cd $GRAILS_HOME/lib/org.springframework/springloaded/jars
ln -s springloaded-1.2.4.RELEASE.jar springloaded-1.2.0.RELEASE.jar

You must also update a major security hole in Commons Collections, which is not fixed in Grails 2.3.x. Download the jar for version 3.2.2 (or higher) from one of:

Install under:

$GRAILS_HOME/lib/commons-collections/commons-collections/

Rename and edit ivy-3.2.1.xml to reflect the new version number.

(comments are closed)