# NoSuchMethodError for org.elasticsearch.action.support.IndicesOptions.ignoreThrottled()

**URL:** https://discuss.elastic.co/t/nosuchmethoderror-for-org-elasticsearch-action-support-indicesoptions-ignorethrottled/195440
**Category:** Elasticsearch
**Created:** [August 16, 2019, 6:49am UTC](https://discuss.elastic.co/t/nosuchmethoderror-for-org-elasticsearch-action-support-indicesoptions-ignorethrottled/195440 "2019-08-16T06:49:12Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ManuMP](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manump/32/51842_2.png) [@ManuMP](https://discuss.elastic.co/u/ManuMP)
#### Post date: [August 16, 2019, 6:49am UTC](https://discuss.elastic.co/t/nosuchmethoderror-for-org-elasticsearch-action-support-indicesoptions-ignorethrottled/195440/1 "2019-08-16T06:49:12Z")

</div>

Hi,

I get the _java.lang.NoSuchMethodError_ for **org.elasticsearch.action.support.IndicesOptions.ignoreThrottled()**, when I execute the the line **client.search(searchRequest, RequestOptions.DEFAULT);** in the following code. I am using the Elasticsearch API version 7.3.0.

What should I do to correct the issue?

> RestHighLevelClient client = new RestHighLevelClient(  
> RestClient.builder(  
> new HttpHost("localhost", 9200, "http"),  
> new HttpHost("localhost", 9201, "http")));
> 
> SearchRequest searchRequest = new SearchRequest();  
> searchRequest.indices("connect200");  
> searchRequest.source(sourceBuilder);  
> SearchResponse resp = client.search(searchRequest, RequestOptions.DEFAULT);  
> client.close();

**Exception details given below**

> Exception in thread "main" java.lang.NoSuchMethodError: org.elasticsearch.action.support.IndicesOptions.ignoreThrottled()Z  
> at org.elasticsearch.client.RequestConverters$Params.withIndicesOptions(RequestConverters.java:966)  
> at org.elasticsearch.client.RequestConverters.addSearchRequestParams(RequestConverters.java:417)  
> at org.elasticsearch.client.RequestConverters.search(RequestConverters.java:404)  
> at org.elasticsearch.client.RestHighLevelClient.lambda$search$2(RestHighLevelClient.java:932)  
> at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1450)  
> at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1424)  
> at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1394)  
> at org.elasticsearch.client.RestHighLevelClient.search(RestHighLevelClient.java:930)  
> at ElasticSearchService.BuildJson(ElasticSearchService.java:253)  
> at ElasticSearchService.searchLog(ElasticSearchService.java:40)  
> at Program.main(Program.java:27)

POM File content for Elasticsearch given below

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

```

---

<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: [August 16, 2019, 8:28am UTC](https://discuss.elastic.co/t/nosuchmethoderror-for-org-elasticsearch-action-support-indicesoptions-ignorethrottled/195440/2 "2019-08-16T08:28:40Z")

</div>

Could you remove the transport lib from your pom and share the full `pom.xml`?

---

<div class="post-metadata">

### Author: ![ManuMP](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manump/32/51842_2.png) [@ManuMP](https://discuss.elastic.co/u/ManuMP)
#### Post date: [August 16, 2019, 8:33am UTC](https://discuss.elastic.co/t/nosuchmethoderror-for-org-elasticsearch-action-support-indicesoptions-ignorethrottled/195440/3 "2019-08-16T08:33:31Z")

</div>

Full POM file attached. I have removed transport dependency. But I still get the issue.

```
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <parent>
    		<groupId>org.springframework.boot</groupId>
    		<artifactId>spring-boot-starter-parent</artifactId>
    		<version>2.1.2.RELEASE</version>
    		<relativePath /> <!-- lookup parent from repository -->
    	</parent>
      <groupId>org.springframework.samples</groupId>
      <artifactId>TestMavenYY</artifactId>
      <version>0.0.1-SNAPSHOT</version>
      
      <properties>

    		<!-- Generic properties -->
    		<java.version>1.8</java.version>
    		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    		

    	

    	</properties>
    	
    	<dependencies>
    		<!-- Spring and Transactions -->
    		<dependency>
    			<groupId>org.springframework</groupId>
    			<artifactId>spring-context</artifactId>
    		
    		</dependency>
    		<dependency>
    			<groupId>org.springframework</groupId>
    			<artifactId>spring-tx</artifactId>
    			
    		</dependency>
    		
    <dependency>
    			<groupId>org.springframework.boot</groupId>
    			<artifactId>spring-boot-starter-web</artifactId>
    			
    		</dependency>
    		

    		<!-- Logging with SLF4J & LogBack -->
    		<dependency>
    			<groupId>org.slf4j</groupId>
    			<artifactId>slf4j-api</artifactId>
    		
    			<scope>compile</scope>
    		</dependency>
    		<dependency>
    			<groupId>ch.qos.logback</groupId>
    			<artifactId>logback-classic</artifactId>
    			
    			<scope>runtime</scope>
    		</dependency>

    		<!-- Hibernate -->
    		<dependency>
    			<groupId>org.hibernate</groupId>
    			<artifactId>hibernate-entitymanager</artifactId>
    			
    		</dependency>

    		
    		<!-- Test Artifacts -->
    		<dependency>
    			<groupId>org.springframework</groupId>
    			<artifactId>spring-test</artifactId>
    			
    			<scope>test</scope>
    		</dependency>
    		<dependency>
    			<groupId>junit</groupId>
    			<artifactId>junit</artifactId>
    			
    			<scope>test</scope>
    		</dependency>
    		<dependency>
    			<groupId>com.siemens.mindsphere</groupId>
    			<artifactId>mindsphere-sdk</artifactId>
    			<version>1.1.0</version>
    		</dependency>
    		<dependency>
                     <groupId>com.siemens.mindsphere</groupId>
                     <artifactId>mindsphere-sdk</artifactId>
                     <version>1.2.1</version>
                 </dependency>
    		
    		
    		<dependency>
    			<groupId>org.springframework</groupId>
    			<artifactId>spring-core</artifactId>
    		
    		
    		</dependency>
    		<dependency>
    		    <groupId>com.google.code.gson</groupId>
    		    <artifactId>gson</artifactId>
    		    
    		</dependency>
    		
    		<dependency>
    		    <groupId>com.rabbitmq</groupId>
    		    <artifactId>amqp-client</artifactId>
    		    
    		</dependency>
    		<dependency>
    		   <groupId>org.glassfish</groupId>
    		   <artifactId>javax.json</artifactId>
    		   <version>1.1.4</version>
    		</dependency>
    		
    		
    		<dependency>
        		<groupId>org.elasticsearch.client</groupId>
        		<artifactId>elasticsearch-rest-high-level-client</artifactId>
        		<version>7.2.0</version>
    		</dependency>
    		

    	</dependencies>	
    </project>
```

---

<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: [August 16, 2019, 8:40am UTC](https://discuss.elastic.co/t/nosuchmethoderror-for-org-elasticsearch-action-support-indicesoptions-ignorethrottled/195440/4 "2019-08-16T08:40:11Z")

</div>

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.3.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)

Might not be the problem here though.

---

<div class="post-metadata">

### Author: ![ManuMP](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manump/32/51842_2.png) [@ManuMP](https://discuss.elastic.co/u/ManuMP)
#### Post date: [August 16, 2019, 9:36am UTC](https://discuss.elastic.co/t/nosuchmethoderror-for-org-elasticsearch-action-support-indicesoptions-ignorethrottled/195440/5 "2019-08-16T09:36:47Z")

</div>

Thanks David. It worked!

---

<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: [September 13, 2019, 9:37am UTC](https://discuss.elastic.co/t/nosuchmethoderror-for-org-elasticsearch-action-support-indicesoptions-ignorethrottled/195440/6 "2019-09-13T09:37:10Z")

</div>

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