Elasticsearch method not being found in spring boot

Hello All. I am really glad I found this discussion forum.

I have been stuck with this issue for a while now and any assistance is appreciated. I am running Spring Boot version 2.2.0 with the ElasticSearch high-level REST Client version 6.4.3 and using version 3.2.0 for the Spring-Data-Elasticsearch version. I am getting the error below. I have tried the following attempts to fix but none do.

1. Change Spring Boot Version multiple times
2. Change ES version multiple times
3. I have cleared my .m2 folder and redownloaded the maven dependencies multiple times.


An attempt was made to call a method that does not exist. The attempt was made from the following location:


The following method did not exist:


The method's class, org.elasticsearch.client.IndicesClient, is available from the following locations:


It was loaded from the following location:



Correct the classpath of your application so that it contains a single, compatible version of org.elasticsearch.client.IndicesClient

My POM is below



Any help is appreciated. I am sure it has to deal with compatibility issues but not sure which. Thanks all!


When using springboot with elasticsearch, you need to be explicit with some transitive dependencies as SpringBoot declares a version 6.4...

Basically you can put this in your pom.xml:


See documentation here: https://docs.spring.io/spring-boot/docs/current/reference/html/howto.html#howto-customize-dependency-versions

1 Like

I was able to get it work. Thanks for your reply @dadoonet

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.