# Using the HighLevelRestClient in OSGI/Karaf

**URL:** <https://discuss.elastic.co/t/using-the-highlevelrestclient-in-osgi-karaf/145303>\
**Category:** Elasticsearch\
**Created:** [August 21, 2018, 6:58am UTC](https://discuss.elastic.co/t/using-the-highlevelrestclient-in-osgi-karaf/145303 "2018-08-21T06:58:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jiinxx](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jiinxx/32/34641_2.png) [@jiinxx](https://discuss.elastic.co/u/jiinxx)\
**Post date:** [August 21, 2018, 6:58am UTC](https://discuss.elastic.co/t/using-the-highlevelrestclient-in-osgi-karaf/145303/1 "2018-08-21T06:58:35Z")

</div>

Hi,  
Im trying to utilizie the HighLevelRestClient in a OSGI-application. However, Im experiencing difficulties getting the client to be accepted as a feature by Karaf. The problem seem to relate to that the ES functionality is divided onto two jars: elasticsearch and elasticsearch-high-level-rest-client which leasds to a split-package-problem. Is this a known issue? Howcome this problem, in this case, has not been resolved (ie not having two jars exporting the same packages)?

The alternative, as I see it, would be to embedd the client jars in my application but that feels suboptimal.  
Has anyone experience using the Rest-client in a OSGI-environment. How did you go about?

Regards

---

<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:** [September 18, 2018, 6:58am UTC](https://discuss.elastic.co/t/using-the-highlevelrestclient-in-osgi-karaf/145303/2 "2018-09-18T06:58:38Z")

</div>

Closed on September 18, 2018, 6:58am UTC

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