我只是在我的电脑上设置Grails并遵循参考 http://grails.org/doc/latest/guide/gettingStarted.html#creatingAnApplication
以下命令给我错误。请帮忙。
C:\Users\jjayarman>grails create-app helloworld --stacktrace
| Environment set to development....
| Error Error executing script CreateApp: _PluginDependencies_groovy$_run_closure1 (NOTE: Stack trace has been filtered. Use --verbose to see entire t
race.)
java.lang.NoClassDefFoundError: _PluginDependencies_groovy$_run_closure1
at _PluginDependencies_groovy.run(_PluginDependencies_groovy:43)
at _PluginDependencies_groovy$run.call(Unknown Source)
at _GrailsArgParsing_groovy$run.call(Unknown Source)
at org.codehaus.gant.IncludeTargets.leftShift(IncludeTargets.groovy:59)
at org.codehaus.gant.IncludeTargets$leftShift.call(Unknown Source)
at _GrailsInit_groovy.run(_GrailsInit_groovy:35)
at _GrailsInit_groovy$run.call(Unknown Source)
at _GrailsCompile_groovy$run.call(Unknown Source)
at org.codehaus.gant.IncludeTargets.leftShift(IncludeTargets.groovy:59)
at org.codehaus.gant.IncludeTargets$leftShift.call(Unknown Source)
at _GrailsCompile_groovy.run(_GrailsCompile_groovy:28)
at _GrailsCompile_groovy$run.call(Unknown Source)
at _GrailsPackage_groovy$run.call(Unknown Source)
at org.codehaus.gant.IncludeTargets.leftShift(IncludeTargets.groovy:59)
at org.codehaus.gant.IncludeTargets$leftShift.call(Unknown Source)
at _GrailsPackage_groovy.run(_GrailsPackage_groovy:28)
at _GrailsPackage_groovy$run.call(Unknown Source)
at _GrailsSettings_groovy$run.call(Unknown Source)
at org.codehaus.gant.IncludeTargets.leftShift(IncludeTargets.groovy:59)
at org.codehaus.gant.IncludeTargets$leftShift.call(Unknown Source)
at _GrailsPlugins_groovy.run(_GrailsPlugins_groovy:33)
at _GrailsPlugins_groovy$run.call(Unknown Source)
at _GrailsCreateProject_groovy$run.call(Unknown Source)
at org.codehaus.gant.IncludeTargets.leftShift(IncludeTargets.groovy:59)
at org.codehaus.gant.IncludeTargets$leftShift.call(Unknown Source)
at _GrailsCreateProject_groovy.run(_GrailsCreateProject_groovy:28)
at _GrailsCreateProject_groovy$run.call(Unknown Source)
at org.codehaus.gant.IncludeTargets.leftShift(IncludeTargets.groovy:59)
at org.codehaus.gant.IncludeTargets$leftShift.call(Unknown Source)
at CreateApp_.run(CreateApp_.groovy:25)
at CreateApp_$run.call(Unknown Source)
at gant.Gant.prepareTargets(Gant.groovy:607)
Caused by: java.lang.ClassNotFoundException: _PluginDependencies_groovy$_run_closure1
... 32 more
| Error Error executing script CreateApp: _PluginDependencies_groovy$_run_closure1
答案 0 :(得分:2)
我知道这对于Linux来说已经很老了,但这个问题是谷歌搜索时的第一个结果" java.lang.NoClassDefFoundError:_GrailsInit_groovy $ _run_closure1_closure6"。
在Linux上,我用source ~/.bashrc
修复了此问题
这是您声明JAVA_HOME和GRAILS_HOME的文件。
也许您需要重新启动Windows才能使这些变量生效。