我试图在我的笔记本电脑上运行 grails,我已经安装了 jdk 1.8.0 和 jre8,我已经正确设置了 JAVA_HOME 和 GRAILS_HOME。当我在命令提示符下键入 %JAVA_HOME% 或 %GRAILS_HOME% 时,它会显示正确的路径。但是当我尝试运行任何 grails 命令时,我收到以下错误:
| Loading Grails 2.1.1
| Error java.lang.reflect.InvocationTargetException
| Error at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
| Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| Error at java.lang.reflect.Method.invoke(Method.java:491)
| Error at org.codehaus.groovy.grails.cli.support.GrailsStarter.rootLoader(GrailsStarter.java:234)
| Error at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStarter.java:262)
| Error at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
| Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| Error at java.lang.reflect.Method.invoke(Method.java:491)
| Error at org.codehaus.groovy.grails.cli.support.GrailsStarter.rootLoader(GrailsStarter.java:234)
| Error at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStarter.java:262)
| Error Caused by: java.lang.NullPointerException: Cannot invoke method getAt() on null object
| Error at grails.util.BuildSettings.configureDependencyManager(BuildSettings.groovy:1208)
| Error at grails.util.BuildSettings$configureDependencyManager.callCurrent(Unknown Source)
| Error at grails.util.BuildSettings.postLoadConfig(BuildSettings.groovy:1121)
| Error at grails.util.BuildSettings.loadConfig(BuildSettings.groovy:1003)
| Error at grails.util.BuildSettings$loadConfig.callCurrent(Unknown Source)
| Error at grails.util.BuildSettings.loadConfig(BuildSettings.groovy:978)
我的笔记本电脑有 Windows 8。对此的任何帮助将不胜感激。