Failed to load plugin class [org.elasticsearch.xpack.XPackPlugin

Below is the pom.xml -> in eclipse facing with Xpack Plugin error. PLease guide.

try {
		esClient = new PreBuiltXPackTransportClient(settings); //--XPACK plugin error 
		for (String h : hosts) {
			esClient.addTransportAddress(new InetSocketTransportAddress(new InetSocketAddress(h,port)));
		}

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

It would help to see the stack trace of the exception you are receiving. Additionally, the transport client is deprecated; you should move to using the High Level Rest Client.

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