# Rest client for Elastic 6.2.x and 7.2.x

**URL:** <https://discuss.elastic.co/t/rest-client-for-elastic-6-2-x-and-7-2-x/241183>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [July 14, 2020, 7:04pm UTC](https://discuss.elastic.co/t/rest-client-for-elastic-6-2-x-and-7-2-x/241183 "2020-07-14T19:04:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashu.vedi](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@ashu.vedi](https://discuss.elastic.co/u/ashu.vedi)\
**Post date:** [July 14, 2020, 7:04pm UTC](https://discuss.elastic.co/t/rest-client-for-elastic-6-2-x-and-7-2-x/241183/1 "2020-07-14T19:04:24Z")

</div>

Hi , We have a sbt project which need to query both elasticsearch 6.2 cluster using sksamuel/elastic4s as well as Elasticsearch 7.2.0 using the bight level rest client for elasticsearch. I am getting errors as there is a dependency that gets overwritten with either 6 or 7 version of rest client for elasticsearch.  
java.lang.NoSuchMethodError: org.elasticsearch.client.RestClient.performRequestAsync(Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;Lorg/apache/http/HttpEntity;Lorg/elasticsearch/client/ResponseListener;[Lorg/apache/http/Header;)V  
[error] sbt.ForkMain$ForkError: java.lang.NoSuchMethodError: org.elasticsearch.client.RestClient.performRequestAsync(Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;Lorg/apache/http/HttpEntity;Lorg/elasticsearch/client/ResponseListener;[Lorg/apache/http/Header;)V

Upon investing so much time, i realised that there is no shading option available for sbt for scala code in intellij. Is it possible to use any of the rest client which can work for both of these in same project?

---

<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:** [August 11, 2020, 7:04pm UTC](https://discuss.elastic.co/t/rest-client-for-elastic-6-2-x-and-7-2-x/241183/2 "2020-08-11T19:04:45Z")

</div>

Closed on August 11, 2020, 7:04pm UTC

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