Hi,
I've been using Elastic 1.4.4, but we're now upgrading to 2.2.0. I am having trouble getting my integration tests to run. The error I'm getting is following:
{
"error": {
"root_cause": [{
"type": "script_exception",
"reason": "failed to compile groovy script"
}],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query",
"grouped": true,
"failed_shards": [{
"shard": 0,
"index": "bokun",
"node": "BNyjts9hTOicRgCAWGdKgQ",
"reason": {
"type": "script_exception",
"reason": "Failed to compile inline script [if(_source.accumulated_availability != null){ for(item in _source.accumulated_availability){ if(start.compareTo(item.day) < 0 && (end == null || end.compareTo(item.day) >= 0)){ return item.day } }} else return null;] using lang [groovy]",
"caused_by": {
"type": "script_exception",
"reason": "failed to compile groovy script",
"caused_by": {
"type": "multiple_compilation_errors_exception",
"reason": "startup failed:\nCould not instantiate global transform class groovy.grape.GrabAnnotationTransformation specified at jar:file:/Users/ogg/.ivy2/cache/org.codehaus.groovy/groovy-all/jars/groovy-all-2.4.4-indy.jar!/META-INF/services/org.codehaus.groovy.transform.ASTTransformation because of exception java.lang.ClassNotFoundException: groovy.grape.GrabAnnotationTransformation\n\nCould not instantiate global transform class org.codehaus.groovy.ast.builder.AstBuilderTransformation specified at jar:file:/Users/ogg/.ivy2/cache/org.codehaus.groovy/groovy-all/jars/groovy-all-2.4.4-indy.jar!/META-INF/services/org.codehaus.groovy.transform.ASTTransformation because of exception java.lang.ClassNotFoundException: org.codehaus.groovy.ast.builder.AstBuilderTransformation\n\n2 errors\n"
}
}
}
}]
},
"status": 500
}
What can cause this? I have the following dependencies in my build.sbt:
"org.codehaus.groovy" % "groovy-all" % "2.4.4",
"com.carrotsearch.randomizedtesting" % "randomizedtesting-runner" % "2.3.0" % "test",
"org.apache.lucene" % "lucene-test-framework" % "5.4.1",
"org.elasticsearch" % "elasticsearch" % "2.2.0" % "test" classifier "tests" withSources(),
"org.elasticsearch" % "elasticsearch" % "2.2.0" withSources(),
"org.elasticsearch.plugin" % "analysis-icu" % "2.2.0" % "test",
"org.elasticsearch.module" % "lang-groovy" % "2.2.0" % "test"
...and I have the following in my EsIntegTestCase extension class:
@Override
protected Settings nodeSettings(int nodeOrdinal) {
return Settings.settingsBuilder()
.put(super.nodeSettings(nodeOrdinal))
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
.put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 1)
.put(Node.HTTP_ENABLED, true)
.put("script.groovy.sandbox.enabled", true)
.put("script.engine.groovy.inline.search", true)
.put("script.engine.groovy.inline.update", "true")
.put("script.inline", true)
.put("script.update", true)
.put("script.indexed", true)
.put("script.default_lang", "groovy")
.build();
}
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return pluginList(GroovyPlugin.class, AnalysisICUPlugin.class);
}
I'm completely stuck, and Google is unwilling to help!
Any help or pointers would be greatly appreciated.
Many thanks,
OGG