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 native-image hints for com.netflix.discovery.DiscoveryClient.shutdown() #4339

Closed
krezovic opened this issue Sep 24, 2024 · 1 comment
Assignees
Labels
Milestone

Comments

@krezovic
Copy link

Describe the bug

Spring Cloud: 2024.0.0-M1 (Spring Boot 3.4.0-SNAPSHOT)

Running the application that embeds the eureka-client works fine, but there's an error during shutdown

2024-09-24 21:21:11  WARN 29634 --- [gateway] [ionShutdownHook] [                                                 ] o.s.b.f.support.DisposableBeanAdapter    : Failed to invoke custom destroy method 'shutdown' on bean with name 'eurekaClient'

org.graalvm.nativeimage.MissingReflectionRegistrationError: The program tried to reflectively invoke method public synchronized void com.netflix.discovery.DiscoveryClient.shutdown() without it being registered for runtime reflection. Add public synchronized void com.netflix.discovery.DiscoveryClient.shutdown() to the reflection metadata to solve this problem. See https://www.graalvm.org/latest/reference-manual/native-image/metadata/#reflection for help.
        at org.graalvm.nativeimage.builder/com.oracle.svm.core.reflect.MissingReflectionRegistrationUtils.forQueriedOnlyExecutable(MissingReflectionRegistrationUtils.java:72) ~[na:na]
        at java.base@21.0.4/java.lang.reflect.Method.acquireMethodAccessor(Method.java:77) ~[gateway:na]
        at java.base@21.0.4/java.lang.reflect.Method.invoke(Method.java:577) ~[gateway:na]
        at org.springframework.beans.factory.support.DisposableBeanAdapter.invokeCustomDestroyMethod(DisposableBeanAdapter.ja
@OlgaMaciaszek OlgaMaciaszek self-assigned this Sep 25, 2024
@OlgaMaciaszek OlgaMaciaszek added this to the 4.1.4 milestone Sep 25, 2024
@OlgaMaciaszek OlgaMaciaszek moved this to In Progress in 2023.0.4 Sep 25, 2024
@OlgaMaciaszek OlgaMaciaszek moved this to In Progress in 2024.0.0-M2 Sep 25, 2024
@OlgaMaciaszek
Copy link
Collaborator

Hi @krezovic, thanks for bringing this up. Will add missing hints.

@github-project-automation github-project-automation bot moved this from In Progress to Done in 2024.0.0-M2 Oct 2, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in 2023.0.4 Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Status: Done
Development

No branches or pull requests

2 participants