RestClient

Hi,

I am trying to use the java client but a receive the following error:

javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/elasticsearch/client/RestClient

Could you please help me to solve this issue?

Best regards,
Andreas Bakopoulos

You need to add the client to your project. Which you probably did not.

I'd read: https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.3/index.html

I use java 1.6 and I have insert in my pom the following dependency:

	<dependency>
		<groupId>org.elasticsearch.client</groupId>
		<artifactId>elasticsearch-rest-client</artifactId>
		<version>6.2.4</version>
	</dependency>

The application builts successfully but when I try to use the RestClient, i receive the following error:
java.lang.NoClassDefFoundError: org/elasticsearch/client/RestClient

Not sure this is your issue but you need at least Java 1.8.

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