Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Regression on Spring Data Elasticsearch #1492

Closed
goafabric opened this issue Feb 12, 2022 · 4 comments
Closed

Regression on Spring Data Elasticsearch #1492

goafabric opened this issue Feb 12, 2022 · 4 comments
Assignees
Labels
status: feedback-provided Feedback has been provided type: regression A bug that is also a regression
Milestone

Comments

@goafabric
Copy link

goafabric commented Feb 12, 2022

Intro
While Spring Data Elasticsearch worked fine with Spring Boot 2.5.x + Spring Native 0.10x
It stopped working in Spring Boot 2.6.x + 0.11x.

During Bootstrap we now get Reflection errors like "no suitable constructor found ..."

Description
I suspect a similiar regression like in #1370,
where the Behavior of TypeHint changed.

And there is als a very similar issue to Spring Data Mongodb
#1487

I already started adding Typehints one by one .. but this isn't ending:

@typehint(types = org.apache.logging.log4j.message.ParameterizedMessageFactory.class, access = {TypeAccess.DECLARED_CLASSES, TypeAccess.DECLARED_CONSTRUCTORS, TypeAccess.DECLARED_METHODS})

@typehint(types = org.springframework.data.elasticsearch.repository.support.SimpleElasticsearchRepository.class, access = {TypeAccess.DECLARED_CLASSES, TypeAccess.DECLARED_CONSTRUCTORS, TypeAccess.DECLARED_METHODS})

Example
I created a simpler branch of the existing repo, that needs to build with the Maven Profile "docker-image-native"
This is missing the Typehints above to get the original errors.
https://github.com/goafabric/example-search-service/tree/native-image-regression

Build works .. bootstrap fails.

I suspect that the existing Typehints for SPring Data Elastic + Mongodb need to be reworked similar like #1370

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Feb 12, 2022
@sdeleuze sdeleuze added this to the 0.11.3 milestone Feb 15, 2022
@sdeleuze sdeleuze self-assigned this Feb 15, 2022
@sdeleuze sdeleuze added type: regression A bug that is also a regression and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Feb 15, 2022
@sdeleuze
Copy link
Contributor

The repro seems not usable, I got compilation error when running ./build-native.sh.

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.319 s
[INFO] Finished at: 2022-02-17T15:18:48+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project example-search-service-core: Compilation failure: Compilation failure: 
[ERROR] /home/seb/playground/example-search-service/example-search-service-core/src/main/java/org/goafabric/example/searchservice/logic/PersonMapper.java:[3,55] cannot find symbol
[ERROR]   symbol:   class PersonBo
[ERROR]   location: package org.goafabric.example.searchservice.persistence
[ERROR] /home/seb/playground/example-search-service/example-search-service-core/src/main/java/org/goafabric/example/searchservice/logic/PersonMapper.java:[11,16] cannot find symbol

Please fix it to allow me to reproduce the issue reported.

@sdeleuze sdeleuze added the status: waiting-for-feedback We need additional information before we can continue label Feb 17, 2022
@goafabric
Copy link
Author

@sdeleuze
Thats very odd, because the build works inside github
https://github.com/goafabric/example-search-service/actions/runs/1833510776

Did you really checkout the branch "native-image-regression" ?
Because this looks like the develop .. which yes seems to be broken currently

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Feb 18, 2022
@sdeleuze
Copy link
Contributor

Ok indeed I missed the native-image-regression, I can reproduce.

@goafabric
Copy link
Author

Ok indeed I missed the native-image-regression, I can reproduce.

ok thanks .. thats good

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: feedback-provided Feedback has been provided type: regression A bug that is also a regression
Development

No branches or pull requests

3 participants