spring-projects / spring-data-elasticsearch

Provide support to increase developer productivity in Java when using Elasticsearch. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
https://spring.io/projects/spring-data-elasticsearch/
Apache License 2.0
2.9k stars 1.33k forks source link

Error thrown in Version 4.2.1 but not specific information #2983

Open fxviking opened 1 day ago

fxviking commented 1 day ago

Hello, We are migrating to Version 7.10 of elastic search in our spring boot application. We are using the spring data elasticsearch version 4.2.1 which comes in the parent spring boot version. We are getting some datetime error which we are unable to understand is for which entity or which attribute. java.lang.StackOverflowError: null at java.base/java.time.format.DateTimePrintContext.<init>(DateTimePrintContext.java:119) at java.base/java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1846) at java.base/java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1822) at org.springframework.data.elasticsearch.core.convert.ElasticsearchDateConverter$PatternDateFormatter.format(ElasticsearchDateConverter.java:261) at org.springframework.data.elasticsearch.core.convert.ElasticsearchDateConverter.format(ElasticsearchDateConverter.java:97) at org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchPersistentProperty$1.write(SimpleElasticsearchPersistentProperty.java:227) at org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverter.propertyConverterWrite(MappingElasticsearchConverter.java:693) at org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverter.writeProperties(MappingElasticsearchConverter.java:657) at org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverter.writeInternal(MappingElasticsearchConverter.java:633) at org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverter.writeProperty(MappingElasticsearchConverter.java:742) at org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverter.writeProperties(MappingElasticsearchConverter.java:674) at org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverter.writeInternal(MappingElasticsearchConverter.java:633) at org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverter.writeInternal(MappingElasticsearchConverter.java:611) at org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverter.writeCollectionInternal(MappingElasticsearchConverter Is there anyway we can get some more specific details of the class or entities causing it .

sothawo commented 1 day ago

Spring Data Elasticsearch 4.2.1 dates from 14. May 2021 and is out of maintenance since April 2022.

I'd suggest you try to create a small reproducer program and then use a debugger to catch that exception and see what value property causes this error. (https://github.com/spring-projects/spring-data-elasticsearch/blob/4.2.1/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverter.java#L261); inspect the accessor.

fxviking commented 1 day ago

Thanks for the update , Problem is that we use AWS Open search and it supports only 7.10 currently I think. Do you think we can take any higher version to be compactible with it?

Thanks

sothawo commented 8 hours ago

You might like to check out Spring Data Opensearch, which is based on Spring Data Elasticsearch, but uses OpenSearch client libraries.

fxviking commented 4 hours ago

You might like to check out Spring Data Opensearch, which is based on Spring Data Elasticsearch, but uses OpenSearch client libraries.

thanks