# java.lang.NoClassDefFoundError: org/elasticsearch/action/GenericAction

**URL:** <https://discuss.elastic.co/t/java-lang-noclassdeffounderror-org-elasticsearch-action-genericaction/202475>\
**Category:** Elasticsearch\
**Created:** [October 7, 2019, 6:08am UTC](https://discuss.elastic.co/t/java-lang-noclassdeffounderror-org-elasticsearch-action-genericaction/202475 "2019-10-07T06:08:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Milind\_Kaklij](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/milind_kaklij/32/53449_2.png) [@Milind\_Kaklij](https://discuss.elastic.co/u/Milind_Kaklij)\
**Post date:** [October 7, 2019, 6:08am UTC](https://discuss.elastic.co/t/java-lang-noclassdeffounderror-org-elasticsearch-action-genericaction/202475/1 "2019-10-07T06:08:32Z")

</div>

Hello Experts,

I am getting **"java.lang.NoClassDefFoundError: org/elasticsearch/action/GenericAction"** while creating index via JAVA API with all 7.0+ ES versions .

I decompiled its library but dont see GenericAction.class .

Can anyone guide me on same how can i resolve this ?

Thanks.

Regards,  
-Milind Kaklij.

---

<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:** [October 7, 2019, 12:42pm UTC](https://discuss.elastic.co/t/java-lang-noclassdeffounderror-org-elasticsearch-action-genericaction/202475/2 "2019-10-07T12:42:34Z")

</div>

which dependencies did you include in your java project?

---

<div class="post-metadata">

**Author:** ![Milind\_Kaklij](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/milind_kaklij/32/53449_2.png) [@Milind\_Kaklij](https://discuss.elastic.co/u/Milind_Kaklij)\
**Post date:** [October 7, 2019, 12:45pm UTC](https://discuss.elastic.co/t/java-lang-noclassdeffounderror-org-elasticsearch-action-genericaction/202475/3 "2019-10-07T12:45:55Z")

</div>

Hi Alexander,

Thanks for reply. i am using below dependency in pom.xml

```
            <dependency>
		<groupId>org.elasticsearch</groupId>
		<artifactId>elasticsearch</artifactId>
		<version>7.4.0</version>
	</dependency>

           <dependency>
		<groupId>org.elasticsearch.client</groupId>
		<artifactId>transport</artifactId>
	</dependency>

```

Thanks.

---

<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:** [October 7, 2019, 12:49pm UTC](https://discuss.elastic.co/t/java-lang-noclassdeffounderror-org-elasticsearch-action-genericaction/202475/4 "2019-10-07T12:49:54Z")

</div>

just before digging deeper: Is there any reason using of not using the [high level rest client](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.4/java-rest-high.html)?

---

<div class="post-metadata">

**Author:** ![Milind\_Kaklij](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/milind_kaklij/32/53449_2.png) [@Milind\_Kaklij](https://discuss.elastic.co/u/Milind_Kaklij)\
**Post date:** [October 7, 2019, 12:56pm UTC](https://discuss.elastic.co/t/java-lang-noclassdeffounderror-org-elasticsearch-action-genericaction/202475/5 "2019-10-07T12:56:49Z")

</div>

Not aware of [high level rest client](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.4/java-rest-high.html) .

I have to create elasticsearch index dynamically at the end of every month in yyyy.dd format.so i was using referring (@[https://www.elastic.co/guide/en/elasticsearch/client/java-rest/master/java-rest-high-create-index.html](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/master/java-rest-high-create-index.html))

My java code is working with respect to elasticsearch version 6.1.1 but not with latest version.

Could you please guide on same?

Thanks .

---

<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:** [October 7, 2019, 12:58pm UTC](https://discuss.elastic.co/t/java-lang-noclassdeffounderror-org-elasticsearch-action-genericaction/202475/6 "2019-10-07T12:58:56Z")

</div>

Are you aware of [date math support in index names](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/date-math-index-names.html) and [index templates](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/indices-get-template.html), that prevents you from creating any indices manually?

That sounds as if you would not need to do any index creation in your own code at all.

---

<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:** [November 4, 2019, 12:58pm UTC](https://discuss.elastic.co/t/java-lang-noclassdeffounderror-org-elasticsearch-action-genericaction/202475/7 "2019-11-04T12:58:57Z")

</div>

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