# Issue with elasticsearch-rest-high-level-client in maven

**URL:** https://discuss.elastic.co/t/issue-with-elasticsearch-rest-high-level-client-in-maven/178877
**Category:** Elasticsearch
**Created:** [April 29, 2019, 9:26am UTC](https://discuss.elastic.co/t/issue-with-elasticsearch-rest-high-level-client-in-maven/178877 "2019-04-29T09:26:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Martin.Sp](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@Martin.Sp](https://discuss.elastic.co/u/Martin.Sp)
#### Post date: [April 29, 2019, 9:26am UTC](https://discuss.elastic.co/t/issue-with-elasticsearch-rest-high-level-client-in-maven/178877/1 "2019-04-29T09:26:34Z")

</div>

Hi guys,

I have an issue with high level rest client. I'm using version 6.7.1 of the client, and every time I build my project I get version version 5.2.2 of **org.elasticsearch:elasticsearch** instead of 6.7.1. This issue is blocking me from deploying my project in WildFly.

```
<dependency>
            <groupId>org.elasticsearch.client</groupId>
            <artifactId>elasticsearch-rest-high-level-client</artifactId>
            <version>6.7.1</version>
 </dependency>

```

Here is the mvn dependency tree for the client.

```
[INFO] +- org.elasticsearch.client:elasticsearch-rest-high-level-client:jar: **6.7.1** :compile
[INFO] | +- org.elasticsearch:elasticsearch:jar: **5.2.2** :compile
[INFO] | | +- org.apache.lucene:lucene-core:jar:6.4.1:compile
[INFO] | | +- org.apache.lucene:lucene-analyzers-common:jar:6.4.1:compile
[INFO] | | +- org.apache.lucene:lucene-backward-codecs:jar:6.4.1:compile
[INFO] | | +- org.apache.lucene:lucene-grouping:jar:6.4.1:compile
[INFO] | | +- org.apache.lucene:lucene-highlighter:jar:6.4.1:compile
[INFO] | | +- org.apache.lucene:lucene-join:jar:6.4.1:compile
[INFO] | | +- org.apache.lucene:lucene-memory:jar:6.4.1:compile
[INFO] | | +- org.apache.lucene:lucene-misc:jar:6.4.1:compile
[INFO] | | +- org.apache.lucene:lucene-queries:jar:6.4.1:compile
[INFO] | | +- org.apache.lucene:lucene-queryparser:jar:6.4.1:compile
[INFO] | | +- org.apache.lucene:lucene-sandbox:jar:6.4.1:compile
[INFO] | | +- org.apache.lucene:lucene-spatial:jar:6.4.1:compile
[INFO] | | +- org.apache.lucene:lucene-spatial-extras:jar:6.4.1:compile
[INFO] | | +- org.apache.lucene:lucene-spatial3d:jar:6.4.1:compile
[INFO] | | +- org.apache.lucene:lucene-suggest:jar:6.4.1:compile
[INFO] | | +- org.elasticsearch:securesm:jar:1.1:compile

```

As a consequence WildFly throws exceptions

```
Caused by: org.jboss.weld.exceptions.DeploymentException: org/elasticsearch/common/xcontent/DeprecationHandler
	at org.jboss.weld.executor.AbstractExecutorServices.checkForExceptions(AbstractExecutorServices.java:66)
	at org.jboss.weld.executor.AbstractExecutorServices.invokeAllAndCheckForExceptions(AbstractExecutorServices.java:43)
	at org.jboss.weld.executor.AbstractExecutorServices.invokeAllAndCheckForExceptions(AbstractExecutorServices.java:51)
	at org.jboss.weld.bootstrap.ConcurrentBeanDeployer.createProducersAndObservers(ConcurrentBeanDeployer.java:103)
	at org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:402)
	at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:83)
	at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:95)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
	... 3 more
```

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [April 29, 2019, 9:47am UTC](https://discuss.elastic.co/t/issue-with-elasticsearch-rest-high-level-client-in-maven/178877/2 "2019-04-29T09:47:27Z")

</div>

Any chance you are using springboot ?

When using springboot with  
elasticsearch, you need to be explicit with some transitive dependencies as SpringBoot declares a version 6.4...

Basically you can put this in your `pom.xml`:

```auto
<properties>
  <elasticsearch.version>7.0.0<elasticsearch.version>
</properties>

```

See documentation here: [https://docs.spring.io/spring-boot/docs/current/reference/html/howto-build.html#howto-customize-dependency-versions](https://docs.spring.io/spring-boot/docs/current/reference/html/howto-build.html#howto-customize-dependency-versions)

---

<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: [May 27, 2019, 9:47am UTC](https://discuss.elastic.co/t/issue-with-elasticsearch-rest-high-level-client-in-maven/178877/3 "2019-05-27T09:47:30Z")

</div>

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