# Problem migrating HLRC from 7.17.X to 8.X

**URL:** <https://discuss.elastic.co/t/problem-migrating-hlrc-from-7-17-x-to-8-x/310195>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [July 20, 2022, 7:01pm UTC](https://discuss.elastic.co/t/problem-migrating-hlrc-from-7-17-x-to-8-x/310195 "2022-07-20T19:01:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gilles\_HURON](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gilles_huron/32/86047_2.png) [@Gilles\_HURON](https://discuss.elastic.co/u/Gilles_HURON)\
**Post date:** [July 20, 2022, 7:01pm UTC](https://discuss.elastic.co/t/problem-migrating-hlrc-from-7-17-x-to-8-x/310195/1 "2022-07-20T19:01:14Z")

</div>

Hello

I am in this situation: big project using elasticsearch rest high level client, 7.16.X, and want to migrate to 8.2.X or later, so I follow these guidelines [Migrating from the High Level Rest Client | Elasticsearch Java API Client [8.3] | Elastic](https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/migrate-hlrc.html)  
But there is an incompatibility with XContentType

```auto
Exception in thread "I/O dispatcher 1" java.lang.NoSuchMethodError: 'org.elasticsearch.xcontent.XContentType org.elasticsearch.xcontent.XContentType.fromMediaTypeOrFormat(java.lang.String)' at org.elasticsearch.client.RestHighLevelClient.parseEntity(RestHighLevelClient.java:2479) at org.elasticsearch.client.RestHighLevelClient.getVersionValidation(RestHighLevelClient.java:2779) at org.elasticsearch.client.RestHighLevelClient.access$200(RestHighLevelClient.java:259) at org.elasticsearch.client.RestHighLevelClient$5.onSuccess(RestHighLevelClient.java:2740) at org.elasticsearch.client.RestClient$FailureTrackingResponseListener.onSuccess(RestClient.java:678) at org.elasticsearch.client.RestClient$1.completed(RestClient.java:399) at org.elasticsearch.client.RestClient$1.completed(RestClient.java:393)

```

(this method called by the 7.16/17 hlrc library on XContentType no longer exist in the 8.0/1/2 version of elasticsearch-x-content module)

How come you run both a java-api-client and a hlrc at the same time without hitting this conflict?

---

<div class="post-metadata">

**Author:** ![Gilles\_HURON](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gilles_huron/32/86047_2.png) [@Gilles\_HURON](https://discuss.elastic.co/u/Gilles_HURON)\
**Post date:** [July 21, 2022, 7:54am UTC](https://discuss.elastic.co/t/problem-migrating-hlrc-from-7-17-x-to-8-x/310195/2 "2022-07-21T07:54:06Z")

</div>

OK I figured out that I have a dependency to the whole elasticsearch 8.X. In that case, it is conflicting obviously, but if I stick to depending only on java-clients, there is no issue. I need to review the entire project to remove the elasticsearch dependency (which is certainly the intent behind creating java-clients)

---

<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 18, 2022, 7:54am UTC](https://discuss.elastic.co/t/problem-migrating-hlrc-from-7-17-x-to-8-x/310195/3 "2022-08-18T07:54:47Z")

</div>

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