Hi,
I am upgrading from ES version 2.x to 6.4.2 and am getting this error while server startup. I am using spring boot version 2.0.5 and have included the 6.4.2 version of ES libraries.
Settings settings = Settings.builder()
.put("transport.ping_schedule", "5s")
.put("cluster.name", clusterId)
.put("request.headers.X-Found-Cluster", clusterId)
.put("xpack.security.user", userPass)
.build();
return new PreBuiltXPackTransportClient(settings)
.addTransportAddress(new TransportAddress(InetAddress.getByName(hostname), port));
Here is the detailed message:
WARN 3714 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'myIncidentsService': Unsatisfied dependency expressed through field 'customerIncidentRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customerIncidentRepository': Cannot resolve reference to bean 'elasticsearchTemplate' while setting bean property 'elasticsearchOperations'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'elasticsearchTemplate' defined in class path resource [org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchDataAutoConfiguration.class]: Unsatisfied dependency expressed through method 'elasticsearchTemplate' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'client' defined in class path resource [com/gmp/bootes/elasticsearch/config/ElasticSearchConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.elasticsearch.client.Client]: Factory method 'client' threw exception; nested exception is java.lang.NoSuchMethodError: org.elasticsearch.common.settings.Settings$Builder.put([Ljava/lang/Object;)Lorg/elasticsearch/common/settings/Settings$Builder;
Any ideas? Happy to provide more information if required.
Thank you !
Kriss