Grails 2.4.0 on Mac OS X extension class fails to load

grails, macos

Solution

The problem is grails sets JAVA_HOME to /Library/Java/Home if JAVA_HOME is not set. Most likely, your system have older jdk (1.6) under that directory. As paranoid mentioned, it requires jdk 1.7. Therefore, even if you have jdk1.7 installed, but grails doesn't use it at all.

Here is the solution to this problem:

- Download and install Oracle JDK, which will be installed to /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk (say if you install jdk1.7u51)

- Run the following commands to change the system settings if you don't want set JAVA_HOME explicitly

cd /System/Library/Frameworks/JavaVM.framework/Versions 
rm CurrentJDK 
ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents CurrentJDK

Then the warning should go away.

Problem

After downloading and installing Grails 2.4.0, I get the following warning when running any grails command, including grails -version: WARNING: Module [groovy-all] - Unable to load extension class [org.codehaus.groovy.runtime.NioGroovyMethods] A web search revealed this post about groovy: http://permalink.gmane.org/gmane.comp.lang.groovy.user/64538 And this one, which includes, but is not specifically about this warning: https://jira.grails.org/browse/GPFILTERPANE-125 I am running Mac OS X 10.9.3, java version "1.7.0_40". Is this a spurious error that can be ignored? So far, grails seems to be working fine, but I thought I would post about it to see if others have experienced something similar.

Original source