I have learned about elasticsearch. I have a problem as follow:
I have installed elasticseach 2.4.1 on my project with maven:
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>2.4.1</version>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>
I create a class and using NodeClient
Node node = NodeBuilder.nodeBuilder().settings(Settings.builder()
.put("path.home", "/path/to/elasticsearch/home/dir")).node();
org.elasticsearch.client.Client client = node.client();
Always after building the project at the first load the below error will appear:
java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.directExecutor()Ljava/util/concurrent/Executor;
and after change guava library to version 19.0 or 20.0 then error appear:
java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.threadpool.ThreadPool
I really appreciate you for sharing your knowledge.