Caused by: java.lang.ClassNotFoundException: org.elasticsearch.transport.Netty3Plugin

前端 未结 2 958
余生分开走
余生分开走 2021-01-18 18:32

I\'m using Spring Boot 2.0.3 Release and i have problem while instantiating org.elasticsearch.client.Client. My code:

Client client = new PreBui         


        
相关标签:
2条回答
  • 2021-01-18 19:25

    Not all dependencies are satisfied by only adding spring-boot-starter-data-elasticsearch.

    It's necessary to explicitly define all remaining dependencies:

        <dependency>
            <groupId>org.elasticsearch.client</groupId>
            <artifactId>transport</artifactId>
            <version>${elasticsearch.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.elasticsearch.plugin</groupId>
            <artifactId>transport-netty4-client</artifactId>
            <version>${elasticsearch.version}</version>
        </dependency>
    

    If you've declared a parent, most likely <version> tag can be omitted.

    0 讨论(0)
  • 2021-01-18 19:30
    <dependency> 
        <groupId>org.elasticsearch.client</groupId> 
        <artifactId>transport</artifactId> 
    </dependency>
    

    This is resolved for me.

    0 讨论(0)
提交回复
热议问题