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.
spinscale
(Alexander Reelsen)
October 7, 2019, 12:42pm
2
which dependencies did you include in your java project?
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.
spinscale
(Alexander Reelsen)
October 7, 2019, 12:49pm
4
just before digging deeper: Is there any reason using of not using the high level rest client ?
Not aware of high level rest client .
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 )
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 .
spinscale
(Alexander Reelsen)
October 7, 2019, 12:58pm
6
Are you aware of date math support in index names and index templates , 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.