# Connecting to Elasticsearch in an executable jar

**URL:** <https://discuss.elastic.co/t/connecting-to-elasticsearch-in-an-executable-jar/104416>\
**Category:** Elasticsearch\
**Created:** [October 18, 2017, 2:51pm UTC](https://discuss.elastic.co/t/connecting-to-elasticsearch-in-an-executable-jar/104416 "2017-10-18T14:51:41Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Canappeco](https://avatars.discourse-cdn.com/v4/letter/c/5fc32e/32.png) [@Canappeco](https://discuss.elastic.co/u/Canappeco)\
**Post date:** [October 19, 2017, 6:27am UTC](https://discuss.elastic.co/t/connecting-to-elasticsearch-in-an-executable-jar/104416/3 "2017-10-19T06:27:30Z")

</div>

I have the same problem when I am using Elasticsearch 5.3.0. You can see my problem [here](https://discuss.elastic.co/t/java-lang-noclassdeffounderror-org-elasticsearch-common-transport-transportaddress/103516/3).

I try to change the Elasticsearch's dependency from 5.3.0 to 5.5.2, and it finally solve the problem. In fact you should keep the same version on both sides, this is really a rude way.

So now I am using ES 5.6.3 with REST Client and never meet such problem. You can try the latest version if possible.

---

_[View the full topic](https://discuss.elastic.co/t/connecting-to-elasticsearch-in-an-executable-jar/104416)._
