我试图在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。
请有人帮我解决错误点。
感谢。
答案 0 :(得分:0)
这与插件无关,它是一个引导/ Gradle问题,因为类路径会导致进程失败,因为进程命令的组合长度大于Windows允许的最大长度。这已在3.1.2中修复,但您必须向build.gradle
添加一个小配置设置,因为它在Linux或OSX中不是问题:
grails {
pathingJar = true
}
有关详细信息,请参阅https://github.com/grails/grails-core/issues/9125。