ElasticsearchException[Failed to load plugin class [org.elasticsearch.xpack.XPackPlugin]]; nested: InvocationTargetException; nested: NoSuchFieldError[V_5_6_0]

Hi,

We are getting below exception while working with elastic search x-pack. stack trace is as below.


ElasticsearchException[Failed to load plugin class [org.elasticsearch.xpack.XPackPlugin]]; nested: InvocationTargetException; nested: NoSuchFieldError[V_5_6_0];
at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:430)
at org.elasticsearch.plugins.PluginsService.(PluginsService.java:102)
at org.elasticsearch.client.transport.TransportClient.newPluginService(TransportClient.java:101)
at org.elasticsearch.client.transport.TransportClient.buildTemplate(TransportClient.java:126)
at org.elasticsearch.client.transport.TransportClient.(TransportClient.java:268)
at org.elasticsearch.transport.client.PreBuiltTransportClient.(PreBuiltTransportClient.java:128)
at org.elasticsearch.xpack.client.PreBuiltXPackTransportClient.(PreBuiltXPackTransportClient.java:55)
at org.elasticsearch.xpack.client.PreBuiltXPackTransportClient.(PreBuiltXPackTransportClient.java:50)
**********************************************************************************

along with our pom.xml as below.


<modelVersion>4.0.0</modelVersion>

 

<properties>
 	<maven.compiler.source>1.8</maven.compiler.source>
	<maven.compiler.target>1.8</maven.compiler.target>
	<maven.release.plugin>2.5.3</maven.release.plugin>
	<!-- <spring.boot.version>2.1.4.RELEASE</spring.boot.version> -->
	<spring.boot.version>2.1.8.RELEASE</spring.boot.version>
 </properties>

<dependencies>


	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
		<exclusions>
			<exclusion>
				<groupId>com.fasterxml.jackson.core</groupId>
				<artifactId>jackson-databind</artifactId>
			</exclusion>
		</exclusions>
	</dependency>






    
<!-- Start x-pack -->
	<dependency>
		<groupId>org.elasticsearch.client</groupId>
		<artifactId>transport</artifactId>
		<version>6.2.4</version>
	</dependency>
	
	<dependency>
     <groupId>org.elasticsearch.client</groupId>
     <artifactId>x-pack-transport</artifactId>
    <!--  <version>5.6.1</version> -->
    <version>5.6.1</version>
    <exclusions>
        <exclusion>
        	<groupId>org.bouncycastle</groupId>
			<artifactId>bcprov-jdk15on</artifactId>
        </exclusion>
    </exclusions>
  </dependency>
 
<dependency>
        <groupId>org.elasticsearch</groupId>
        <artifactId>elasticsearch</artifactId>
       <!--  <version>5.4.3</version> -->
      <version>5.4.3</version> 
    </dependency>

<dependency>
        <groupId>com.unboundid</groupId>
        <artifactId>unboundid-ldapsdk</artifactId>
        <version>3.2.0</version>
    </dependency>
    <!-- <dependency>
        <groupId>org.bouncycastle</groupId>
        <artifactId>bcprov-jdk15on</artifactId>
        <version>1.58</version>
    </dependency>
    <dependency>
        <groupId>org.bouncycastle</groupId>
        <artifactId>bcpkix-jdk15on</artifactId>
        <version>1.58</version>
    </dependency> -->
</dependencies>


 <build>
	<plugins>
		<plugin>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-maven-plugin</artifactId>
		</plugin>
		<plugin>
			<artifactId>maven-release-plugin</artifactId>
			<version>${maven.release.plugin}</version>
		</plugin>
		
		<!-- Junit5 plugin-->
		<plugin>
			<artifactId>maven-surefire-plugin</artifactId>
			<version>2.19.1</version>
			<dependencies>
				<dependency>
					<groupId>org.junit.platform</groupId>
					<artifactId>junit-platform-surefire-provider</artifactId>
					<version>1.0.1</version>
				</dependency>
			</dependencies>
		</plugin>
	</plugins>
</build>

Thankful for your help.

It might be more helpful to post your question in https://github.com/spring-projects/spring-data-elasticsearch, as more people who are familiar with this project will hang out there

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