# Problem integrating elasticsearch hadoop with Hortonworks sandbox

**URL:** <https://discuss.elastic.co/t/problem-integrating-elasticsearch-hadoop-with-hortonworks-sandbox/52420>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [June 10, 2016, 7:57am UTC](https://discuss.elastic.co/t/problem-integrating-elasticsearch-hadoop-with-hortonworks-sandbox/52420 "2016-06-10T07:57:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zpp](https://avatars.discourse-cdn.com/v4/letter/z/54ee81/32.png) [@zpp](https://discuss.elastic.co/u/zpp)\
**Post date:** [June 10, 2016, 7:57am UTC](https://discuss.elastic.co/t/problem-integrating-elasticsearch-hadoop-with-hortonworks-sandbox/52420/1 "2016-06-10T07:57:24Z")

</div>

Hi, I'm pretty new to Hadoop, and I'm following this [tutorial](https://github.com/hortonworks/hadoop-tutorials/blob/master/Community/T07_Elasticsearch_Hadoop_Integration.md) to try to integrate elasticsearch to Hadoop. Everything went well util I tried to execute below statement:

INSERT OVERWRITE TABLE eslogs SELECT s.time, s.ext, s.ip, s.req, s.res, s.agent FROM logs s;

Exception was thrown.. java.lang.NoClassDefFoundError: org/apache/commons/httpclient/URIException..  
I followed this post [Hive (HDP 2.3) and ES-Hadoop Integration Issue](https://discuss.elastic.co/t/hive-hdp-2-3-and-es-hadoop-integration-issue/34209) to manually add the httpclient jar file in, but the error persisted. How can I fix this issue?

---

<div class="post-metadata">

**Author:** ![james.baiera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james.baiera/32/10209_2.png) [@james.baiera](https://discuss.elastic.co/u/james.baiera)\
**Post date:** [June 10, 2016, 1:56pm UTC](https://discuss.elastic.co/t/problem-integrating-elasticsearch-hadoop-with-hortonworks-sandbox/52420/2 "2016-06-10T13:56:46Z")

</div>

Hello!

Could you post which versions of the systems and artifacts you are using as well as the classpath from your executing hive tasks? Could you also post the commands you used to add the httpclient jar? Thanks!

---

<div class="post-metadata">

**Author:** ![zpp](https://avatars.discourse-cdn.com/v4/letter/z/54ee81/32.png) [@zpp](https://discuss.elastic.co/u/zpp)\
**Post date:** [June 13, 2016, 6:22am UTC](https://discuss.elastic.co/t/problem-integrating-elasticsearch-hadoop-with-hortonworks-sandbox/52420/3 "2016-06-13T06:22:12Z")

</div>

Hi James,  
I'm using Hortonworks Sandbox 2.4 for VMWare, and elasticsearch-hadoop 2.3.2  
The elasticsearch version i'm using 2.3.3.

I copied all ES related JARs to the hive lib directory, used the following commands to add in the JARs  
ADD JAR /usr/hdp/2.4.0.0-169/hive/lib/elasticsearch-hadoop-2.3.2.jar  
ADD JAR /usr/hdp/2.4.0.0-169/hive/lib/httpclient-4.4.jar

If I do the LIST JARS command, I only see the above two JARs listed.

Thank you!

---

<div class="post-metadata">

**Author:** ![zpp](https://avatars.discourse-cdn.com/v4/letter/z/54ee81/32.png) [@zpp](https://discuss.elastic.co/u/zpp)\
**Post date:** [June 13, 2016, 7:51am UTC](https://discuss.elastic.co/t/problem-integrating-elasticsearch-hadoop-with-hortonworks-sandbox/52420/4 "2016-06-13T07:51:05Z")

</div>

Hi, realised I have added in the wrong http lib, the error went away once I add in the common http client library, thank you.

---

<div class="post-metadata">

**Author:** ![james.baiera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james.baiera/32/10209_2.png) [@james.baiera](https://discuss.elastic.co/u/james.baiera)\
**Post date:** [June 13, 2016, 11:06am UTC](https://discuss.elastic.co/t/problem-integrating-elasticsearch-hadoop-with-hortonworks-sandbox/52420/5 "2016-06-13T11:06:08Z")

</div>

Cheers!

---

<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 6, 2017, 1:24pm UTC](https://discuss.elastic.co/t/problem-integrating-elasticsearch-hadoop-with-hortonworks-sandbox/52420/6 "2017-07-06T13:24:21Z")

</div>


