-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
RESTEasy resource with constructor or field injection failing with RESTEASY003190 #39137
Comments
I am not in front of my work laptop but it seems the no-args ctor might not be generated here.
|
CC @geoand |
#39146 takes care of the issue |
This relates to: quarkusio#39137
This relates to: quarkusio#39137
It turns out that the PR above was wrong. The use case here actually is not supported because of the use of I opened #39152 to improve logging of this kind of thing in the future |
This relates to: quarkusio#39137
Is So I have to use this to make it work:
|
Correct, although it works in RESTEasy Reactive (with most types) |
If this is a Quarkus Arc limitation, it should be documented here: https://quarkus.io/guides/cdi-reference#supported_features_and_limitations.
So using |
I'll update the docs soon |
This is not really a great place to document this limitation as it's not an Arc limitation - although I understand why one would look there. |
This relates to: quarkusio#39137
Yes, it's not an ArC limitation and it should not be documented there. I think that there should be a dedicated "CDI integratoin" chapter in the RETEasy Classic/Reactive docs and all the details (that I don't know ;-) should be explained there. |
As Of course, a better way would be to remove these restrictions if possible. If there are no longer such restrictions for resteasy-reactive, then perhaps it would be possible to eliminate these restrictions for resteasy as well. |
A section in https://quarkus.io/guides/resteasy would be IMO best. |
Add debugging to resteasy / arc interactions
@geoand The following version does also not work:
I get the following error:
So it doesn't matter whether |
Yeah, you are just trying to work around the problem and that won't work :) |
The general advice (for RESTEasy Classic at least) is that anything with |
Describe the bug
I have the following JAX-RS Endpoint:
I get this compile error:
Expected behavior
Constructor injection with
@ApplicationScoped
and final fields should work without the need to set a no-args-constructor:Actual behavior
Constructor injection with
@ApplicationScoped
and final fields does not work .How to Reproduce?
Reproducer:
Output of
uname -a
orver
No response
Output of
java -version
openjdk version "21.0.2" 2024-01-16 OpenJDK Runtime Environment (build 21.0.2+13-58) OpenJDK 64-Bit Server VM (build 21.0.2+13-58, mixed mode, sharing)
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)3.8.1
Additional information
A similiar issue (but with
@Singleton
-scope) is reported here #16475.The text was updated successfully, but these errors were encountered: