# Multiple ES-Hadoop versions detected in the classpath

**URL:** https://discuss.elastic.co/t/multiple-es-hadoop-versions-detected-in-the-classpath/335852
**Category:** Elasticsearch
**Tags:** es-hadoop
**Created:** [June 13, 2023, 9:47am UTC](https://discuss.elastic.co/t/multiple-es-hadoop-versions-detected-in-the-classpath/335852 "2023-06-13T09:47:23Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Suna.Y](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@Suna.Y](https://discuss.elastic.co/u/Suna.Y)
#### Post date: [June 13, 2023, 9:47am UTC](https://discuss.elastic.co/t/multiple-es-hadoop-versions-detected-in-the-classpath/335852/1 "2023-06-13T09:47:23Z")

</div>

[ERROR: Multiple ES-Hadoop versions detected - Elastic Stack / Elasticsearch - Discuss the Elastic Stack](https://discuss.elastic.co/t/error-multiple-es-hadoop-versions-detected/59220)

I met the same question as above.  
If keep those versions, it occurs Multiple ES-Hadoop versions detected as follows:  
Caused by: java.lang.RuntimeException: Multiple ES-Hadoop versions detected in the classpath; please use only one  
jar:file:/home/app/yarn/nm/usercache/hive/filecache/2753/elasticsearch-hadoop-7.1.1.jar  
jar:file:/home/app/yarn/nm/usercache/hive/filecache/2756/elasticsearch-hadoop-7.0.0-rc1.jar

if i remove one version, it occurs:  
Previous writer likely failed to write hdfs://nameservice1/tmp/hive/hive/\_tez\_session\_dir/bcde0ca7-3058-4670-a1e0-480de5264124-resources/elasticsearch-hadoop-7.0.0-rc1.jar. Failing because I am unlikely to write too.

---

<div class="post-metadata">

### Author: ![Keith\_Massey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keith_massey/32/83666_2.png) [@Keith\_Massey](https://discuss.elastic.co/u/Keith_Massey)
#### Post date: [June 13, 2023, 1:16pm UTC](https://discuss.elastic.co/t/multiple-es-hadoop-versions-detected-in-the-classpath/335852/2 "2023-06-13T13:16:00Z")

</div>

How are you running hive, and how are you adding elasticsearch-hadoop to the classpath?

---

<div class="post-metadata">

### Author: ![Suna.Y](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@Suna.Y](https://discuss.elastic.co/u/Suna.Y)
#### Post date: [June 14, 2023, 1:12am UTC](https://discuss.elastic.co/t/multiple-es-hadoop-versions-detected-in-the-classpath/335852/3 "2023-06-14T01:12:46Z")

</div>

I runned hive sqls as belows on tez by using beeline client. Es version is 7.1.1, Hive version is cdp7.4.4, and I added "elasticsearch-hadoop-7.1.1.jar", "commons-httpclient-3.0.1.jar", "commons-httpclient-3.1.jar" in the aux path set in cloudera manager. By the way, it works on cdh6.3.2 by mr engine, but in cdp7.4.4, it supporst only tez engine, and missed commons-httpclient-3.0.1.jar.

```auto
DROP TABLE IF EXISTS test.history_deliver_es;

CREATE TABLE IF NOT EXISTS test.history_deliver_es( fund_account string,
                              rowkey string )
                              STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'
                              TBLPROPERTIES('es.resource' = 'test/history_deliver_es',
'es.index.auto.create' = 'false',
"es.mapping.id" = "fund_account",
'es.mapping.names' = 'fund_account:fund_account, rowkey:rowkey',
'es.nodes.wan.only'='true',
'es.batch.write.retry.count'='10',
'es.batch.write.refresh'='true',
'es.batch.write.retry.wait'='60s',
'es.http.timeout'='100m',
'es.batch.size.entries'='100',
'es.nodes' = '192.25.109.213:9200,192.25.109.214:9200,192.25.109.215:9200,192.25.109.216:9200,192.25.109.217:9200');

insert into table test.history_deliver_es values('02','20230613');

```

---

<div class="post-metadata">

### Author: ![Suna.Y](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@Suna.Y](https://discuss.elastic.co/u/Suna.Y)
#### Post date: [June 14, 2023, 3:29am UTC](https://discuss.elastic.co/t/multiple-es-hadoop-versions-detected-in-the-classpath/335852/4 "2023-06-14T03:29:44Z")

</div>

Solved. Restart yarn and hive after remove 7.0.0-rc1.jar in aux path and clean yarn cache dir. I think it related to cdp, maybe jar takes effect only after restarting. Thanks for your response.

---

<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 12, 2023, 3:29am UTC](https://discuss.elastic.co/t/multiple-es-hadoop-versions-detected-in-the-classpath/335852/5 "2023-07-12T03:29:50Z")

</div>

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