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

ContainerRequestFilter checking for annotation fails in native #42919

Closed
krisgerhard opened this issue Aug 30, 2024 · 4 comments · Fixed by #42941
Closed

ContainerRequestFilter checking for annotation fails in native #42919

krisgerhard opened this issue Aug 30, 2024 · 4 comments · Fixed by #42941
Assignees
Labels
Milestone

Comments

@krisgerhard
Copy link

krisgerhard commented Aug 30, 2024

Describe the bug

First off - it is very similar to #42537
Error is the same, workaround is the same, unfortunately solution was not, so my issue still reproduces with 3.14.1.

resourceInfo.resourceMethod.getAnnotation(...) fails on native build.

Issue was introduced recently, last Quarkus version where issue is not present is 3.12.3 (easily verifyable using reproducer).

Workaround is to add @RegisterForReflection on GreetingResource

Expected behavior

No error

Actual behavior

Caused by: java.lang.NoSuchMethodException: org.acme.GreetingResource.hello()
        at java.base@21.0.4/java.lang.Class.checkMethod(DynamicHub.java:1078)
        at java.base@21.0.4/java.lang.Class.getMethod(DynamicHub.java:1063)
        at org.jboss.resteasy.reactive.server.spi.ResteasyReactiveResourceInfo.getMethod(ResteasyReactiveResourceInfo.java:79)

How to Reproduce?

  1. Clone https://github.com/krisgerhard/quarkus_nosuchmethod_reproducer/
  2. Run integration tests

Output of uname -a or ver

No response

Output of java -version

No response

Mandrel or GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@krisgerhard krisgerhard added area/native-image kind/bug Something isn't working labels Aug 30, 2024
@quarkus-bot
Copy link

quarkus-bot bot commented Aug 30, 2024

/cc @Karm (mandrel), @galderz (mandrel), @zakkak (mandrel,native-image)

@geoand
Copy link
Contributor

geoand commented Aug 31, 2024

Thanks, I'll have a look next week

@geoand geoand self-assigned this Aug 31, 2024
@geoand geoand closed this as completed in 7485b41 Sep 2, 2024
geoand added a commit that referenced this issue Sep 2, 2024
Register all resource classes for reflection when `ResourceInfo` is used
@quarkus-bot quarkus-bot bot added this to the 3.16 - main milestone Sep 2, 2024
@gsmet gsmet modified the milestones: 3.16 - main, 3.14.2 Sep 2, 2024
gsmet pushed a commit to gsmet/quarkus that referenced this issue Sep 2, 2024
gsmet pushed a commit to gsmet/quarkus that referenced this issue Sep 3, 2024
@krisgerhard
Copy link
Author

The speed of response and resolution is incredible. Thank you @geoand!

@geoand
Copy link
Contributor

geoand commented Sep 5, 2024

🙏🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants