Monday, December 26, 2011

Upgrading to Grails 2.0

With the recent release of grails 2.0, I upgraded OpenArc's ILocker and E-Arc software tonight. Ran into a few hurdles along the way and thought sharing them here might help someone else in the future.

First, I ran into some dependency conflicts and had to add some new lines to grails-app/conf/BuildConfig.groovy:
+      runtime ('edu.ucar:netcdf:4.2-min') {
+ excludes 'slf4j-api', 'slf4j-simple'
+ }
+
+ runtime ('org.apache.tika:tika-parsers:0.10') {
+ excludes "commons-logging", "commons-codec"
+ }
+
+ runtime ('org.xhtmlrenderer:core-renderer:R8') {
+ excludes "itext", "commons-logging", "commons-codec"
+ }
In particular, lots of trouble with "commons-logging" and "slf4j".

Secondly, I'm using java7 (1.7.0_b147) and was getting the error "javac: target release 1.6 conflicts with default source release 1.7" so I add to throw:

grails.project.source.level = 1.6
into grails-app/conf/BuildConfig.groovy as well.

Finally and most perplexingly, I got everything running, but when I went to browse the application I just got an empty blank page, no error messages, nothing, just a blank page. Uggh. Turns out you must run:
grails install-templates
if you've installed the templates previously. It's documented in the upgrade notes - would have been a nice thing to throw up a warning about too.

No comments: