# NoSuchMethodError for client.updateByQuery(...)

**URL:** <https://discuss.elastic.co/t/nosuchmethoderror-for-client-updatebyquery/176647>\
**Category:** Elasticsearch\
**Created:** [April 12, 2019, 2:26pm UTC](https://discuss.elastic.co/t/nosuchmethoderror-for-client-updatebyquery/176647 "2019-04-12T14:26:36Z")\
**Posts on this page:** 1\
**Showing post:** 8

<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 13, 2019, 8:31am UTC](https://discuss.elastic.co/t/nosuchmethoderror-for-client-updatebyquery/176647/8 "2019-04-13T08:31:07Z")

</div>

See [org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: org.elasticsearch.action.index.IndexRequest.ifSeqNo()J](https://discuss.elastic.co/t/org-springframework-web-util-nestedservletexception-handler-dispatch-failed-nested-exception-is-java-lang-nosuchmethoderror-org-elasticsearch-action-index-indexrequest-ifseqno-j/176627/2?u=dadoonet)

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

Basically add this to your project to workaround the problem

> <https://github.com/dadoonet/legacy-search/commit/ecf586f9f1b887354e975d3ecba36f1c7d010ba8>

Another way is documented at: [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)

You can put this in your `pom.xml`:

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

```

---

_[View the full topic](https://discuss.elastic.co/t/nosuchmethoderror-for-client-updatebyquery/176647)._
