6

我只是在我的电脑上设置 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
4

1 回答 1

2

我知道这对于 Linux 来说已经很老了,但是这个问题是谷歌搜索“java.lang.NoClassDefFoundError: _GrailsInit_groovy$_run_closure1_closure6”时的第一个结果。

在 Linux 上,我使用source ~/.bashrc 这是您声明 JAVA_HOME 和 GRAILS_HOME 的文件来解决此问题。

也许您需要重新启动 Windows 才能使这些变量生效。

请参阅在 linux 中安装 grails

于 2014-05-31T14:01:59.550 回答