ElasticSearch High Level Client spring boot classnotfounderror

I am using elastic search high level rest api. version 6.1.2. I am using spring boot version 1.5.7. Below is my dependencies:

repositories {
maven {
url 'http://s3.amazonaws.com/download.elasticsearch.org/lucenesnapshots/00142c9'
}
mavenCentral()
}

dependencies:{
compile 'org.elasticsearch.client:elasticsearch-rest-high-level-client:6.1.2'
}

but I am getting below exception:
java.lang.ClassNotFoundException: org.elasticsearch.action.main.MainRequest

1 Like

you dont need the snapshot repo, until you are using a pre release.

Does gradle dependencies show the high level client?

--Alex

Yes, initially I havent included snapshot.

still its same error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/elasticsearch/action/main/MainRequest

Does gradle dependencies show the high level client?
I have included:

dependencies {
compile 'org.elasticsearch.client:elasticsearch-rest-high-level-client:6.1.2'
}

Do i have to add any other dependencies?

1 Like

same here:

Caused by: java.lang.NoClassDefFoundError: org/elasticsearch/action/main/MainRequest

POM:

<dependency>
    <groupId>org.elasticsearch.client</groupId>
    <artifactId>elasticsearch-rest-high-level-client</artifactId>
    <version>5.6.7</version>
</dependency>
org.springframework.boot spring-boot-starter-parent 1.5.10.RELEASE

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