1

I'm trying to add ElasticSearch plugin in my Grails 3.1.6 project. I installed plugin as:

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

And configured application.yml as

elasticSearch:
client:
    node: local
datastoreImpl: hibernateDatastore

But when I try to run application, i'm getting error as below:

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

I'm using IntellijIdea v2016 as IDE.

Would someone please help me to figure out the error spot please.

Thanks.

Yogen Rai
  • 2,961
  • 3
  • 25
  • 37
  • Maybe try `Run with --stacktrace option to get the stack trace` ? – Burt Beckwith May 27 '16 at 01:46
  • @BurtBeckwith i tried, and getting message trailed by Caused by: java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.8 .0_45\bin\java.exe" (in directory "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 extensi on is too long ... 6 more | Error Failed to start server – Yogen Rai May 27 '16 at 19:19

1 Answers1

0

This isn't related to the plugin, it's a Boot/Gradle problem caused by having a classpath that causes the process to fail because the combined length of the process command is larger than the max Windows allows. This was fixed in 3.1.2 but you have to add a small config setting to build.gradle since it's not a problem in Linux or OSX:

grails {
   pathingJar = true
}

See https://github.com/grails/grails-core/issues/9125 for more info.

Burt Beckwith
  • 75,342
  • 5
  • 143
  • 156