Elastic Search客户端找不到请求类

时间:2019-05-31 10:22:32

标签: elasticsearch methodnotfound

我在Spring Boot中使用弹性搜索6.3.2 Java客户端,错误是缺少请求类。

但是,从依赖关系中,我可以清楚地找到请求类。任何想法如何解决这个问题?只添加一个弹性搜索依赖项

<dependency>
    <groupId>org.elasticsearch.client</groupId>
    <artifactId>elasticsearch-rest-high-level-client</artifactId>
    <version>6.3.2</version>
</dependency>

the dependencies

java.lang.NoSuchMethodError: org.elasticsearch.client.Request.<init>(Ljava/lang/String;Ljava/lang/String;)V
    at org.elasticsearch.client.RestClient.performRequest(RestClient.java:317) ~[elasticsearch-rest-client-6.4.3.jar:6.4.3]
    at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:522) ~[elasticsearch-rest-high-level-client-6.3.2.jar:6.4.3]
    at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:508) ~[elasticsearch-rest-high-level-client-6.3.2.jar:6.4.3]
    at org.elasticsearch.client.IndicesClient.create(IndicesClient.java:99) ~[elasticsearch-rest-high-level-client-6.3.2.jar:6.4.3]
    at hello.HelloController.createIndex(HelloController.java:61) ~[classes/:na]
    at hello.HelloController.index(HelloController.java:39) ~[classes/:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_151]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_151]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_151]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_151]

0 个答案:

没有答案