mercoledì 16 luglio 2014

Running new versions of Grails

Sometimes you write an app in development on your local machine. A few days after a new Grails version is released. You still keep the older version on your development machine, but decide to install Grails newer version on your remote machine.

You check out the project, run grails update (since 2.4.2 you use the set-grails-version command), launch compilations commands and then...an error happened and it is not a bug of yours (you'll have time to discover those!).

Today my error is

war script error: java.lang.NoClassDefFoundError: Config$_run_closure1_closure5

I had openjdk1.6_27 (ok ok, it should be time to update it) on my remote machine and both grails 2.3.7 (working correctley) and grails 2.4.2 making me crazy.

I solved my issue simply by creating a brand new project on my remote machine (i did it to exclude it was a java version error) and packaging it as a war file. This was very useful to Grails: doing this way it was able to download all the new dependencies and plugin it needed.

Then back again to my checked out project and now grails war works correctly!

That'all.
Now that you have read my article, i would like to show you another thing: i've developed an app to help increase customers registration and customers conversion.

You can find it at appromocodes.com

mercoledì 9 luglio 2014

Changing Grails server port

This is just a little hint very fast and useful: if you want to change the default port (8080) to another one, the fastest way is to add this property to the BuildConfig.groovy file (you can modfy Config.groovy but then you will have to set the Dserver property when launching grails):

grails.server.port.http = 8090

That's all folk!
Now that you have read my article, i would like to show you another thing: i've developed an app to help increase customers registration and customers conversion.

You can find it at appromocodes.com