Hi,
Probably I missing something really obvious, but I struggling with
running elasticsearch in my tests. First I've tried initalizing this
way:
client =
NodeBuilder.nodeBuilder().local(true).client(true).build().client();
I expect this will create a working elasticsearch instance ...
But if I try to index a couple of documents, it throws the following
error:
org.elasticsearch.common.util.concurrent.UncategorizedExecutionException:
Failed execution
at
org.elasticsearch.action.support.AdapterActionFuture.rethrowExecutionException(AdapterActionFuture.java:
85)
at
org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:
48)
at
com.ms.otclcm.cascade.persistor.query.elastic.ElasticSearchService.index(ElasticSearchService.scala:
39)
at
com.ms.otclcm.cascade.persistor.lucene.ElasticSearchServiceSpec.(ElasticSearchServiceSpec.scala:
32)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:
27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.specs.runner.JUnitSuiteRunner.testSuite(JUnitSuiteRunner.scala:
37)
at
org.specs.runner.JUnitSuiteRunner.getDescription(JUnitSuiteRunner.scala:
57)
at org.junit.runner.Runner.testCount(Runner.java:38)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.countTestCases(JUnit4TestClassReference.java:
30)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.countTests(RemoteTestRunner.java:
487)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
455)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:
390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:
197)
Caused by: java.util.concurrent.ExecutionException:
java.lang.NullPointerException
at org.elasticsearch.common.util.concurrent.AbstractFuture
$Sync.getValue(AbstractFuture.java:263)
at org.elasticsearch.common.util.concurrent.AbstractFuture
$Sync.get(AbstractFuture.java:250)
at
org.elasticsearch.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:
78)
at
org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:
44)
... 17 more
Caused by: java.lang.NullPointerException
at
org.elasticsearch.cluster.service.InternalClusterService.add(InternalClusterService.java:
185)
at
org.elasticsearch.action.support.master.TransportMasterNodeOperationAction.innerExecute(TransportMasterNodeOperationAction.java:
145)
at
org.elasticsearch.action.support.master.TransportMasterNodeOperationAction.doExecute(TransportMasterNodeOperationAction.java:
87)
at
org.elasticsearch.action.support.master.TransportMasterNodeOperationAction.doExecute(TransportMasterNodeOperationAction.java:
44)
at
org.elasticsearch.action.support.BaseAction.execute(BaseAction.java:
61)
at
org.elasticsearch.action.bulk.TransportBulkAction.doExecute(TransportBulkAction.java:
106)
at
org.elasticsearch.action.bulk.TransportBulkAction.doExecute(TransportBulkAction.java:
59)
at
org.elasticsearch.action.support.BaseAction.execute(BaseAction.java:
61)
at org.elasticsearch.client.node.NodeClient.bulk(NodeClient.java:146)
at
org.elasticsearch.client.action.bulk.BulkRequestBuilder.doExecute(BulkRequestBuilder.java:
131)
at
org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:
56)
at
org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:
51)
... 17 more
I've tried various flags setting the 'client' to 'false', but it
doesn't changed anything.
Can you shed any light on this problem ?
Thanks,
Zsombor