vijaymohan
(Vijay Mohan)
December 18, 2018, 9:37pm
1
I am upgrading elastic 2.x to 6.x. I have to update the spring data dependency as well to do the elastic upgrade. (Using elastic cloud managed service with x-pack-transport)
Here is my dependencies:
spring-data-elasticsearch 3.1.3.RELEASE
x-pack-transport 5.6.1
This include elasticsearch dependency version 6.2.2.
I am getting following error while initialize the spring application.
Caused by: java.lang.NoSuchMethodError: org.elasticsearch.common.settings.Settings$Builder.put([Ljava/lang/Object;)Lorg/elasticsearch/common/settings/Settings$Builder;
at org.elasticsearch.xpack.notification.email.Account.<clinit>(Account.java:71)
at org.elasticsearch.xpack.XPackPlugin.<clinit>(XPackPlugin.java:192)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:556)
There are other threads related to same issue but never answered, and closed .
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 TransportAdd…
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
Exception in thread "main" java.lang.NoSuchMethodError: org.elasticsearch.common.settings.Settings$Builder.put([Ljava/lang/Object;)Lorg/elasticsearch/common/settings/Settings$Builder;
This is the message I am getting.
Please let me know if you guys have any solution for this issue.
rjernst
(Ryan Ernst)
December 18, 2018, 10:59pm
2
Why are you depending on x-pack-transport 5.6.1? This needs to be the same version as elasticsearch. The version you are including is expecting utilities and such within the elasticsearch server jar to be older versions.
vijaymohan
(Vijay Mohan)
December 19, 2018, 4:50am
3
rjernst:
x-pack-transport 5.6.1
x-pack-transport 5.6.1 is the latest stable version
vijaymohan
(Vijay Mohan)
December 19, 2018, 6:23pm
4
Hi @rjernst
I looked into it more and realized your answer is right, I was using dependency that is not compatible with elastic version 6.2.2 I have upgraded the x-pack-transport version to 6.2.2 and its working fine now.
And i am using spring version 5.x
Here is the updated dependency
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-elasticsearch</artifactId>
<version>3.1.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>x-pack-transport</artifactId>
<version>6.2.2</version>
</dependency>
Documentation available here: https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-xpack-client.html
system
(system)
Closed
January 16, 2019, 6:23pm
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.