# ElasticSearch High Level Client spring boot classnotfounderror

**URL:** <https://discuss.elastic.co/t/elasticsearch-high-level-client-spring-boot-classnotfounderror/117411>\
**Category:** Elasticsearch\
**Created:** [January 29, 2018, 7:59am UTC](https://discuss.elastic.co/t/elasticsearch-high-level-client-spring-boot-classnotfounderror/117411 "2018-01-29T07:59:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mihir\_Shah](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Mihir\_Shah](https://discuss.elastic.co/u/Mihir_Shah)\
**Post date:** [January 29, 2018, 7:59am UTC](https://discuss.elastic.co/t/elasticsearch-high-level-client-spring-boot-classnotfounderror/117411/1 "2018-01-29T07:59:52Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [January 29, 2018, 8:11am UTC](https://discuss.elastic.co/t/elasticsearch-high-level-client-spring-boot-classnotfounderror/117411/2 "2018-01-29T08:11:44Z")

</div>

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

Does `gradle dependencies` show the high level client?

--Alex

---

<div class="post-metadata">

**Author:** ![Mihir\_Shah](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Mihir\_Shah](https://discuss.elastic.co/u/Mihir_Shah)\
**Post date:** [January 29, 2018, 9:00am UTC](https://discuss.elastic.co/t/elasticsearch-high-level-client-spring-boot-classnotfounderror/117411/3 "2018-01-29T09:00:36Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![kaykumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaykumar/32/27578_2.png) [@kaykumar](https://discuss.elastic.co/u/kaykumar)\
**Post date:** [February 8, 2018, 11:27pm UTC](https://discuss.elastic.co/t/elasticsearch-high-level-client-spring-boot-classnotfounderror/117411/4 "2018-02-08T23:27:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 8, 2018, 11:27pm UTC](https://discuss.elastic.co/t/elasticsearch-high-level-client-spring-boot-classnotfounderror/117411/5 "2018-03-08T23:27:23Z")

</div>

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