# Hive Elasticsearch integration issue

**URL:** https://discuss.elastic.co/t/hive-elasticsearch-integration-issue/18460
**Category:** Elasticsearch
**Created:** [July 3, 2014, 1:09pm UTC](https://discuss.elastic.co/t/hive-elasticsearch-integration-issue/18460 "2014-07-03T13:09:38Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Surender\_Singh](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Surender\_Singh](https://discuss.elastic.co/u/Surender_Singh)
#### Post date: [July 3, 2014, 1:09pm UTC](https://discuss.elastic.co/t/hive-elasticsearch-integration-issue/18460/1 "2014-07-03T13:09:38Z")

</div>

I am integrating Hive and elasticsearch as per:  
[http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/current/hive.html#\_writing\_data\_to\_elasticsearch\_2](http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/current/hive.html#_writing_data_to_elasticsearch_2)

and

[https://github.com/hortonworks/hadoop-tutorials/blob/master/Community/T07\_Elasticsearch\_Hadoop\_Integration.md](https://github.com/hortonworks/hadoop-tutorials/blob/master/Community/T07_Elasticsearch_Hadoop_Integration.md)

I have started a EMR cluster on aws also started the elasticsearch cluster  
on 2 ec2 classic instances.  
I am stuck up while trying to insert data from the hive table to  
hive-elasticsearch tbale it throws me the following error log:

Diagnostic Messages for this Task:  
Error: java.lang.RuntimeException: Error in configuring object  
at  
org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:109)  
at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:75)  
at  
org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133)  
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:427)  
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)  
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:167)  
at java.security.AccessController.doPrivileged(Native Method)  
at javax.security.auth.Subject.doAs(Subject.java:415)  
at  
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)  
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162)  
Caused by: java.lang.reflect.InvocationTargetException  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at  
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)  
at  
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
at java.lang.reflect.Method.invoke(Method.java:606)  
at  
org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:106)  
... 9 more  
Caused by: java.lang.RuntimeException: Error in configuring object  
at  
org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:109)  
at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:75)  
at  
org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133)  
at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:38)  
... 14 more  
Caused by: java.lang.reflect.InvocationTargetException  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at  
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)  
at  
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
at java.lang.reflect.Method.invoke(Method.java:606)  
at  
org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:106)  
... 17 more  
Caused by: java.lang.RuntimeException: Map operator initialization failed  
at org.apache.hadoop.hive.ql.exec.ExecMapper.configure(ExecMapper.java:126)  
... 22 more  
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException:  
java.lang.NullPointerException  
at  
org.apache.hadoop.hive.ql.exec.FileSinkOperator.initializeOp(FileSinkOperator.java:402)  
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:375)  
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:451)  
at  
org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:407)  
at  
org.apache.hadoop.hive.ql.exec.SelectOperator.initializeOp(SelectOperator.java:62)  
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:375)  
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:451)  
at  
org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:407)  
at  
org.apache.hadoop.hive.ql.exec.TableScanOperator.initializeOp(TableScanOperator.java:186)  
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:375)  
at  
org.apache.hadoop.hive.ql.exec.MapOperator.initializeOp(MapOperator.java:543)  
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:375)  
at org.apache.hadoop.hive.ql.exec.ExecMapper.configure(ExecMapper.java:105)  
... 22 more  
Caused by: java.lang.NullPointerException  
at  
org.apache.hadoop.hive.ql.exec.FileSinkOperator.initializeOp(FileSinkOperator.java:339)  
... 34 more

I have already tried many things like adding the jar files like :  
add jar hive/lib/hive-hbase-handler-0.11.0.jar;  
add jar hive/lib/hbase-0.94.18.jar;  
add jar hive/lib/zookeeper-3.4.3.jar;  
add jar hive/lib/guava-15.0.jar;  
add jar hive/lib/protobuf-java-2.5.0.jar;  
add jar hive/lib/hive-serde-0.11.0.jar;  
add jar hive/lib/hive-contrib-0.11.0.jar

it still does not work.

I have downloaded the version of elasticsearch-hadoop jar file from the  
elasticsearch.org.

Could anyone help me track the issue.

Thanks in advance.  
Regards,  
Surender.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/edbc7482-a4c6-40d6-8198-78bd42f3da7a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/edbc7482-a4c6-40d6-8198-78bd42f3da7a%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:18am UTC](https://discuss.elastic.co/t/hive-elasticsearch-integration-issue/18460/2 "2017-07-06T01:18:08Z")

</div>


