我正在尝试在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问题,它是由于类路径导致进程失败而引起的,因为process命令的组合长度大于Windows允许的最大值。此问题已在3.1.2中修复,但您必须在build.gradle
中添加一个小的配置设置,因为在Linux或OSX中这不是问题:
grails {
pathingJar = true
}
有关更多信息,请参见https://github.com/grails/grails-core/issues/9125。
关于grails - ElasticSearch插件导致服务器在Grails 3.1.6中停止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37472843/