ElasticSearch High Level Client spring boot classnotfounderror


(Mihir Shah) #1

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


(Alexander Reelsen) #2

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

Does gradle dependencies show the high level client?

--Alex


(Mihir Shah) #3

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?


(Kaykumar) #4

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

(system) #5

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