# RestHighLevelClient HTTP dependency problem

**URL:** <https://discuss.elastic.co/t/resthighlevelclient-http-dependency-problem/119685>\
**Category:** Elasticsearch\
**Created:** [February 13, 2018, 6:00pm UTC](https://discuss.elastic.co/t/resthighlevelclient-http-dependency-problem/119685 "2018-02-13T18:00:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeffrey\_Blayney](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@Jeffrey\_Blayney](https://discuss.elastic.co/u/Jeffrey_Blayney)\
**Post date:** [February 13, 2018, 6:00pm UTC](https://discuss.elastic.co/t/resthighlevelclient-http-dependency-problem/119685/1 "2018-02-13T18:00:28Z")

</div>

Well, the RestHighLevelClient doesn't work either..

Here is the stack trace:

Caused by: java.lang.ClassNotFoundException: org.apache.http.conn.util.PublicSuffixMatcherLoader at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)

Here is the code it crashes on:

RestClientBuilder restClientBuilder = RestClient.builder(new HttpHost(this.clusterHost, this.clusterPort, this.clusterScheme));  
lazy\_client = new RestHighLevelClient(restClientBuilder);

Here is my POM file:

```
<!-- for content searching -->
<dependency>
   <groupId>org.elasticsearch</groupId>
   <artifactId>elasticsearch</artifactId>
   <version>6.0.1</version>
</dependency>

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

<!-- https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.0/_maven_repository.html -->
<dependency>
   <groupId>org.elasticsearch.client</groupId>
   <artifactId>elasticsearch-rest-client-sniffer</artifactId>
   <version>6.0.1</version>
</dependency>

```

Any help is appreciated!

I've fixed this but don't know how to delete a post.

---

<div class="post-metadata">

**Author:** ![Jeffrey\_Blayney](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@Jeffrey\_Blayney](https://discuss.elastic.co/u/Jeffrey_Blayney)\
**Post date:** [February 14, 2018, 12:00am UTC](https://discuss.elastic.co/t/resthighlevelclient-http-dependency-problem/119685/2 "2018-02-14T00:00:55Z")

</div>

Oops, another lib pulled in an old version of the apache http client.

---

<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:** [March 14, 2018, 12:01am UTC](https://discuss.elastic.co/t/resthighlevelclient-http-dependency-problem/119685/3 "2018-03-14T00:01:04Z")

</div>

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