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

**URL:** <https://discuss.elastic.co/t/failed-to-load-plugin-class-org-elasticsearch-xpack-xpackplugin/183299>\
**Category:** Elasticsearch\
**Created:** [May 29, 2019, 10:18am UTC](https://discuss.elastic.co/t/failed-to-load-plugin-class-org-elasticsearch-xpack-xpackplugin/183299 "2019-05-29T10:18:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krishna\_Kodumagulla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krishna_kodumagulla/32/43306_2.png) [@Krishna\_Kodumagulla](https://discuss.elastic.co/u/Krishna_Kodumagulla)\
**Post date:** [May 29, 2019, 10:18am UTC](https://discuss.elastic.co/t/failed-to-load-plugin-class-org-elasticsearch-xpack-xpackplugin/183299/1 "2019-05-29T10:18:12Z")

</div>

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>
```

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [May 31, 2019, 6:01am UTC](https://discuss.elastic.co/t/failed-to-load-plugin-class-org-elasticsearch-xpack-xpackplugin/183299/2 "2019-05-31T06:01:49Z")

</div>

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](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/master/java-rest-high.html).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 28, 2019, 6:01am UTC](https://discuss.elastic.co/t/failed-to-load-plugin-class-org-elasticsearch-xpack-xpackplugin/183299/3 "2019-06-28T06:01:54Z")

</div>

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