Dependency Error while using Java High Level Rest Client


(zhouyong) #1

Hi,
I am trying to develop a spring boot based elasticsearch project and I am trying to use Java High Level Rest Client in the same.
I am initializing the client like this:

Caused by: java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: org/elasticsearch/common/CheckedConsumer

My pom.xml has the following dependencies:

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

(luxiaoxun) #2

Try add this:

            <dependency>
    			<groupId>org.elasticsearch.client</groupId>
    			<artifactId>elasticsearch-rest-client</artifactId>
    			<version>${es.version}</version>
    		</dependency>

(zhouyong) #3

Thanks, but still reported the same mistake.


(system) #4

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