ElasticSearch 插件导致服务器在 Grails 3.1.6 中停止

ElasticSearch plugin causing server to stop in Grails 3.1.6

我正在尝试在我的 Grails 3.1.6 项目中添加 ElasticSearch 插件。 我将插件安装为:

dependencies {
//..
compile 'org.grails.plugins:elasticsearch:1.0.0.2' 
//..}

并配置application.yml为

elasticSearch:
client:
    node: local
datastoreImpl: hibernateDatastore

但是当我尝试 运行 应用程序时,出现如下错误:

BUILD SUCCESSFUL

Total time: 5.118 secs
|Running application...

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':bootRun'.
> A problem occurred starting process 'command 'C:\Program Files\Java\jdk1.8.0_45\bin\java.exe''

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error |
Failed to start server (Use --stacktrace to see the full trace)

Process finished with exit code 1

我正在使用 IntellijIdea v2016 IDE。

谁能帮我找出错误的地方。

谢谢。

这与插件无关,这是一个 Boot/Gradle 问题,原因是类路径导致进程失败,因为进程命令的组合长度大于最大值 Windows 允许。这在 3.1.2 中已修复,但您必须向 build.gradle 添加一个小的配置设置,因为它在 Linux 或 OSX:

中不是问题
grails {
   pathingJar = true
}

有关详细信息,请参阅 https://github.com/grails/grails-core/issues/9125