我在尝试运行连接到Elasticsearch的应用程序时收到此错误消息.
An attempt was made to call the method org.elasticsearch.client.RestHighLevelClient.(Lorg/elasticsearch/client/RestClientBuilder;)V but it does not exist. Its class, org.elasticsearch.client.RestHighLevelClient, is available from the following locations:
jar:file:/path/application/target/application-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/elasticsearch-rest-high-level-client-5.6.3.jar!/org/elasticsearch/client/RestHighLevelClient.class
It was loaded from the following location:
jar:file:/path/application/target/application-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/elasticsearch-rest-high-level-client-5.6.3.jar!/
Action:
Correct the classpath of your application so that it contains a single, compatible version of org.elasticsearch.client.RestHighLevelClient
该应用程序的构建没有错误,并且我的maven存储库中只有一个版本的elasticsearch SDK.
这是我pom的相关部分:
org.springframework.boot