# \[Java-API\] Conflict with jetty, and elasticsearch

**URL:** <https://discuss.elastic.co/t/java-api-conflict-with-jetty-and-elasticsearch/53821>\
**Category:** Elasticsearch\
**Created:** [June 23, 2016, 7:09pm UTC](https://discuss.elastic.co/t/java-api-conflict-with-jetty-and-elasticsearch/53821 "2016-06-23T19:09:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![orenteriab](https://avatars.discourse-cdn.com/v4/letter/o/b5ac83/32.png) [@orenteriab](https://discuss.elastic.co/u/orenteriab)\
**Post date:** [June 23, 2016, 7:09pm UTC](https://discuss.elastic.co/t/java-api-conflict-with-jetty-and-elasticsearch/53821/1 "2016-06-23T19:09:45Z")

</div>

Hey guys!

It seems Jetty has problems with the Elasticsearch 2 java api, because both of them use Netty underneath. So, do you have any ideas on how to make it run?

I had no problems to run this way with ES 1, but now that I've upgraded it seems is hard to make them work together.

Is there a way to solve this?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 23, 2016, 7:31pm UTC](https://discuss.elastic.co/t/java-api-conflict-with-jetty-and-elasticsearch/53821/2 "2016-06-23T19:31:36Z")

</div>

You could potentially try to shade netty in Elasticsearch or in your project.

Read: [https://www.elastic.co/blog/to-shade-or-not-to-shade](https://www.elastic.co/blog/to-shade-or-not-to-shade)

---

<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:** [July 5, 2017, 10:41pm UTC](https://discuss.elastic.co/t/java-api-conflict-with-jetty-and-elasticsearch/53821/3 "2017-07-05T22:41:00Z")

</div>


