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.
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:
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.
Install Java 7
Found where is Java 7 Home.
On Mac OS run /usr/libexec/java_home. For example my home is /Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home
For example contents of my .bash_profile file is:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home
export GRAILS_HOME=/Users/admin/work/grails
export PATH=$JAVA_HOME:$GRAILS_HOME/bin:$PATH
Now grails is using jdk7 and is without warnings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With