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

Missing reflection metadata for feign.ResponseInterceptor$Chain #959

Closed
justogaiht opened this issue Dec 22, 2023 · 1 comment
Closed

Missing reflection metadata for feign.ResponseInterceptor$Chain #959

justogaiht opened this issue Dec 22, 2023 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@justogaiht
Copy link

justogaiht commented Dec 22, 2023

Describe the bug
spring-cloud-starter-openfeign: 4.1.0

Unable to run native compiled application with FeignClients.

Caused by: org.graalvm.nativeimage.MissingReflectionRegistrationError: The program tried to reflectively invoke method public default feign.ResponseInterceptor$Chain feign.Capability.enrich(feign.ResponseInterceptor$Chain) without it being registered for runtime reflection. Add public default feign.ResponseInterceptor$Chain feign.Capability.enrich(feign.ResponseInterceptor$Chain) to the reflection metadata to solve this problem.

It works on 4.1.0-RC1.

Sample
Create a simple FeignClient and run native compiled executable.

Dependencies versions

implementation platform("org.springframework.boot:spring-boot-dependencies:3.2.0")
       implementation platform("org.springframework.cloud:spring-cloud-dependencies:2023.0.0")
   implementation ('org.springframework.cloud:spring-cloud-starter-openfeign')

Workaround:

implementation platform("org.springframework.boot:spring-boot-dependencies:3.2.0")
       implementation platform("org.springframework.cloud:spring-cloud-dependencies:2023.0.0")
   implementation ('org.springframework.cloud:spring-cloud-starter-openfeign')
   implementation ('io.github.openfeign:feign-core'){
   	version{ strictly '12.5'}
   }
   implementation ('io.github.openfeign:feign-micrometer'){
   	version{ strictly '12.5'}
   }
@OlgaMaciaszek
Copy link
Collaborator

Was able to reproduce when Micrometer support enabled.

@OlgaMaciaszek OlgaMaciaszek added bug Something isn't working and removed in progress labels Jan 17, 2024
@OlgaMaciaszek OlgaMaciaszek added this to the 4.1.1 milestone Jan 17, 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
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants