ElasticSearch High Level Client ClassNotFoundError

ElasticSearch Version: 5.6.4
JAVA JDK 1.8
Spring Boot 1.5.8

Caused by: java.lang.ClassNotFoundException: org.elasticsearch.action.main.MainRequest
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

I keep getting this error for this line:
this.restHighLevelClient = new RestHighLevelClient(restLowLevelClient);

I have the following dependecy in my POM

org.elasticsearch.client
elasticsearch-rest-high-level-client
${elastic.version}

1 Like

IIRC you need spring boot 2.0.

But unsure though.

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