Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Compatibility is broken with spring-data-elasticsearch #383

Closed
ms-semarchy opened this issue Dec 3, 2024 · 1 comment
Closed

[BUG] Compatibility is broken with spring-data-elasticsearch #383

ms-semarchy opened this issue Dec 3, 2024 · 1 comment
Labels
bug Something isn't working untriaged

Comments

@ms-semarchy
Copy link

ms-semarchy commented Dec 3, 2024

What is the bug?

When using findByXXX method of a repository:

java.lang.NoSuchMethodError: 'void org.springframework.data.elasticsearch.core.document.SearchDocumentResponse.<init>(long, java.lang.String, float, java.lang.String, java.lang.String, java.util.List, org.springframework.data.elasticsearch.core.AggregationsContainer, org.springframework.data.elasticsearch.core.suggest.response.Suggest, org.springframework.data.elasticsearch.core.SearchShardStatistics)'
	at org.opensearch.data.client.orhlc.SearchDocumentResponseBuilder.from(SearchDocumentResponseBuilder.java:112)
	at org.opensearch.data.client.orhlc.SearchDocumentResponseBuilder.from(SearchDocumentResponseBuilder.java:63)
	at org.opensearch.data.client.orhlc.OpenSearchRestTemplate.search(OpenSearchRestTemplate.java:410)
	at org.springframework.data.elasticsearch.repository.query.AbstractElasticsearchRepositoryQuery.execute(AbstractElasticsearchRepositoryQuery.java:123)
	at org.springframework.data.repository.core.support.RepositoryMethodInvoker.doInvoke(RepositoryMethodInvoker.java:170)
	at org.springframework.data.repository.core.support.RepositoryMethodInvoker.invoke(RepositoryMethodInvoker.java:158)
	at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.doInvoke(QueryExecutorMethodInterceptor.java:170)
	at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.invoke(QueryExecutorMethodInterceptor.java:149)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:223)
	at jdk.proxy3/jdk.proxy3.$Proxy129.findByTenantName(Unknown Source)

-> SearchDocumentResponseBuilder constructs aSearchDocumentResponse with the wrong number of parameters.

It seems this has been resolved in recent commit 6b99d03
for the next 1.6.0 (but still not available).

How can one reproduce the bug?

  • Create a repository for an index
  • populate data in the index
  • implement a find method an run it

What is the expected behavior?

Should not fail and work like the previous version.

What is your host/environment?

spring-data-opensearch-starter 1.5.4
spring-boot 3.4.0

MacOS arm64 / Java 21

@ms-semarchy ms-semarchy added bug Something isn't working untriaged labels Dec 3, 2024
@ms-semarchy ms-semarchy changed the title [BUG] Compatiblity is broken with spring-data-elasticsearch [BUG] Compatibility is broken with spring-data-elasticsearch Dec 3, 2024
@reta
Copy link
Collaborator

reta commented Dec 3, 2024

@ms-semarchy the Spring Data OpenSearch with SB 3.4 support is not yet released, hope to cut the release soon

@reta reta closed this as completed Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged
Projects
None yet
Development

No branches or pull requests

2 participants