krishnakumarp
krishnakumarp

Reputation: 9295

java.lang.NoSuchMethodError: org.elasticsearch.common.settings.Settings.settingsBuilder()

Trying to use spring-data Ingalls-M1 release with spring-boot-starter-parent 1.4.0.RELEASE.

The application startup is failing to instantiate org.elasticsearch.client.Client with the root Exception

java.lang.NoSuchMethodError: org.elasticsearch.common.settings.Settings.settingsBuilder()

ElasticSearchConfiguration class is as given below.

@Configuration
public class ElasticSearchConfiguration {

    @Bean
    public ElasticsearchTemplate elasticsearchTemplate(Client client, Jackson2ObjectMapperBuilder jackson2ObjectMapperBuilder) {
        return new ElasticsearchTemplate(client, new CustomEntityMapper(jackson2ObjectMapperBuilder.createXmlMapper(false).build()));
    }
...
}

Can I manually configure an instance of Client? How?

Upvotes: 2

Views: 4358

Answers (1)

ubervillain
ubervillain

Reputation: 51

org.elasticsearch.common.settings.Settings.settingsBuilder() has been deprecated in favor of org.elasticsearch.common.settings.Settings.builder():

https://github.com/elastic/elasticsearch/commit/42526ac28e07da0055faafca1de6f8c5ec96cd85

Upvotes: 1

Related Questions