【问题标题】:ElasticSearch plugin causing server to stop in Grails 3.1.6ElasticSearch 插件导致服务器在 Grails 3.1.6 中停止
【发布时间】:2016-09-25 03:58:27
【问题描述】:

我正在尝试在我的 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。

请有人帮我找出错误点。

谢谢。

【问题讨论】:

  • 也许可以试试Run with --stacktrace option to get the stack trace ?
  • @BurtBeckwith 我试过了,得到的消息由 Caused by: java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.8 .0_45\bin\java.exe " (在目录 "F:\project\grails\hubbub"): CreateProcess err or=206, the filename or extension is too long at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(Def aultProcessLauncher.java:25) 。 .. 5 more Caused by: java.io.IOException: CreateProcess error=206, The filename or extension is too long ... 6 more |错误无法启动服务器

标签: grails grails-plugin elasticsearch-plugin grails-3.1


【解决方案1】:

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

grails {
   pathingJar = true
}

请参阅https://github.com/grails/grails-core/issues/9125 了解更多信息。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-04-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多