0

Exception in thread "main" java.lang.NoSuchMethodError: org.elasticsearch.client.RestHighLevelClient.(Lorg/elasticsearch/client/RestClient;Lorg/elasticsearch/core/CheckedConsumer;Ljava/util/List;Ljava/lang/Boolean;)V at org.elasticsearch.client.RestHighLevelClientBuilder.build(RestHighLevelClientBuilder.java:53)

I tried to change the version of the elastic in pom.xml file.

1 Answers1

0

It is hard to say what you are trying to do based on your question. It would have helped me to help you better if you specified which version you are migrating from, showed the relevant fragment of your pom.xml file and the code that generates this error.

In general the old style High Level Rest Client (HLRC) has been removed and no longer shipped with v8.x. Saying this, you can still use HLRC from v7.17 if you enable compatibility mode.

However, since HLRC has been deprecated for a while and has been removed in 8.x, you should probably consider migrating to the new Java API Client. Check the migration strategy for more information https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/migrate-hlrc.html

imotov
  • 28,277
  • 3
  • 90
  • 82