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

Upgrading to 2.2.2 - REST resource extending abstract class fail on POST/PUT #20008

Closed
kjq opened this issue Sep 8, 2021 · 1 comment · Fixed by #20010
Closed

Upgrading to 2.2.2 - REST resource extending abstract class fail on POST/PUT #20008

kjq opened this issue Sep 8, 2021 · 1 comment · Fixed by #20010
Assignees
Labels
area/resteasy-reactive kind/bug Something isn't working
Milestone

Comments

@kjq
Copy link

kjq commented Sep 8, 2021

Describe the bug

Upgrading to 2.2.2.Final REST resources, that worked before with 2.1.4, fail upgrading to 2.2.2 with:

ERROR: HTTP Request to /ping/something/method failed, error id: a7a9216a-21e6-4a88-b2fb-79510e13d22b-1
java.lang.RuntimeException: java.lang.NoSuchMethodException: service.PingResource.someMethod(api.Message,api.BaseResource$MethodParams)

If I "override" the method in the derived class it will work.

This also seems to be specific with having the generic type and/or a class "body" that is sent over. Using plain Map (should_run_inherited_method_with_map) works as an example.

Replicator attached.
upgrade2.zip

Expected behavior

POST/PUT REST methods inherited from a "base" resource should be exposed/usable through a "derived" class. This worked in 2.1.4 originally.

Actual behavior

POST/PUT resource calls throws NoSuchMethodException on POST/PUT methods.

GET seems to work fine. Raw types, like Map, seems to work fine.

How to Reproduce?

  1. Run the reproducer test case - fails with MethodNotFound.
  2. Change Quarkus version to 2.1.4 - succeeds as expected.

Quarkus version or git rev

2.2.2.Final

@kjq kjq added the kind/bug Something isn't working label Sep 8, 2021
@geoand geoand self-assigned this Sep 8, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Sep 8, 2021

/cc @FroMage, @stuartwdouglas

geoand added a commit to geoand/quarkus that referenced this issue Sep 8, 2021
In cases where a type variable was being used,
the declared type was not being set the type bound,
but to the actual resolved type.
This caused problems when a resource method was being
looked up reflectively.

Fixes: quarkusio#20008
stuartwdouglas added a commit that referenced this issue Sep 9, 2021
Fix declaredType handling in RESTEasy Reactive
@quarkus-bot quarkus-bot bot added this to the 2.3 - main milestone Sep 9, 2021
geoand added a commit to geoand/quarkus that referenced this issue Sep 10, 2021
In cases where a type variable was being used,
the declared type was not being set the type bound,
but to the actual resolved type.
This caused problems when a resource method was being
looked up reflectively.

Fixes: quarkusio#20008
(cherry picked from commit 97e11a1)
@geoand geoand modified the milestones: 2.3 - main, 2.2.3.Final Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/resteasy-reactive kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants