# I am trying to implement the Elasticsearch REST 6.6.1client in RedHat Fuse

**URL:** <https://discuss.elastic.co/t/i-am-trying-to-implement-the-elasticsearch-rest-6-6-1client-in-redhat-fuse/172215>\
**Category:** Elasticsearch\
**Created:** [March 13, 2019, 8:40pm UTC](https://discuss.elastic.co/t/i-am-trying-to-implement-the-elasticsearch-rest-6-6-1client-in-redhat-fuse/172215 "2019-03-13T20:40:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeff.cassels](https://avatars.discourse-cdn.com/v4/letter/j/e47c2d/32.png) [@jeff.cassels](https://discuss.elastic.co/u/jeff.cassels)\
**Post date:** [March 13, 2019, 8:40pm UTC](https://discuss.elastic.co/t/i-am-trying-to-implement-the-elasticsearch-rest-6-6-1client-in-redhat-fuse/172215/1 "2019-03-13T20:40:37Z")

</div>

I am trying to implement the Elasticsearch REST 6.6.1 client in RedHat Fuse and I believe an old jar is being pulled in somewhere. This class does not exist in the elasticsearch-6.6.1.jar. Any ideas?

java.lang.NoClassDefFoundError: org/elasticsearch/common/xcontent/ToXContentFragment  
at java.lang.ClassLoader.defineClass1(Native Method)[:1.8.0\_161]  
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)[:1.8.0\_161]  
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2318)  
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1524)

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [March 13, 2019, 11:33pm UTC](https://discuss.elastic.co/t/i-am-trying-to-implement-the-elasticsearch-rest-6-6-1client-in-redhat-fuse/172215/2 "2019-03-13T23:33:36Z")

</div>

> [@jeff.cassels](#):
>
> java.lang.NoClassDefFoundError: org/elasticsearch/common/xcontent/ToXContentFragment

That class can be found in `elasticsearch-x-content-6.6.1.jar`

- [Maven Central Repository Search](https://search.maven.org/artifact/org.elasticsearch/elasticsearch-x-content/6.6.1/jar)

How are you pulling in the Rest client? Are you using a dependency manager?

---

<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:** [April 10, 2019, 11:33pm UTC](https://discuss.elastic.co/t/i-am-trying-to-implement-the-elasticsearch-rest-6-6-1client-in-redhat-fuse/172215/3 "2019-04-10T23:33:40Z")

</div>

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