0
votes

I was able to connect to Elastic Serarch 5.5.0 using spring-data-elasticsearch 3.0.0.RC2.

I want to convert my app into a spring boot application. I tried Spring Boot version 2.0.0.M2 , but I got the below error

Caused by: java.lang.NoSuchMethodError: org.springframework.data.elasticsearch.c
ore.mapping.ElasticsearchPersistentProperty.findAnnotation(Ljava/lang/Class;)Lja
va/lang/annotation/Annotation;
        at org.springframework.data.elasticsearch.core.mapping.SimpleElasticsear
chPersistentEntity.addPersistentProperty(SimpleElasticsearchPersistentEntity.jav
a:157) ~[spring-data-elasticsearch-3.0.0.RC2.jar!/:?]
        at org.springframework.data.elasticsearch.core.mapping.SimpleElasticsear
chPersistentEntity.addPersistentProperty(SimpleElasticsearchPersistentEntity.jav
a:47) ~[spring-data-elasticsearch-3.0.0.RC2.jar!/:?]
        at org.springframework.data.mapping.context.AbstractMappingContext$Persi
stentPropertyCreator.createAndRegisterProperty(AbstractMappingContext.java:559)
~[spring-data-commons-2.0.0.M4.jar!/:?]
        at org.springframework.data.mapping.context.AbstractMappingContext$Persi
stentPropertyCreator.doWith(AbstractMappingContext.java:528) ~[spring-data-commo
ns-2.0.0.M4.jar!/:?]
        at org.springframework.util.ReflectionUtils.doWithFields(ReflectionUtils
.java:727) ~[spring-core-5.0.0.RC2.jar!/:5.0.0.RC2]

As per the below link version matrix , spring boot is not available for Elastic Search 5 version.

https://github.com/spring-projects/spring-data-elasticsearch/wiki/Spring-Data-Elasticsearch---Spring-Boot---version-matrix

But I feel this matrix is out dated since spring-data-elasticsearch has already started to support ElasticSearch-5.5.0

Let me know if you could successfully run spring-data-elasticsearch connecting to Elastic Search 5 using Spring Boot .

1

1 Answers

0
votes

It works fine when I upgraded spring-boot-starter-parent to 2.0.0.M3