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
quarkus-resteasy-jsonb Marshaling Generic Type results in WARNINGS on each request #3538
Comments
Also, I just tried to run in Native mode. And neither option above produces output from my endpoint. just '''{}''' is returned |
More Information. Turns out the anonymous class is merely changing the behavior of what is being logged for the very first request after a hot-redeploy. ( Adding the {} makes the first request not get logged with a warning, but subsequent ones do ) So the anonymous class was just a red herring. I always get the warning. |
Adding @RegisterForReflection Fixed the issue with Native mode. Generics must not be supported in the Quarkus auto-registration? So the only issue seems to be the noisy warning message |
This is needed when a JAX-RS resource returns a parameterized type that is meant to be an enclosing class Fixes: quarkusio#3538
I opened #3557 to handle the case you mentioned about needing As for the log message, it is coming from Yasson, not sure what we could do about it. |
This is needed when a JAX-RS resource returns a parameterized type that is meant to be an enclosing class Fixes: quarkusio#3538
@geoand well, it could be a Yasson issue or a RESTEasy issue (with RESTEasy not providing the correct information to Yasson). @sean-scott-lr could you try to reproduce the issue with simple Yasson code. If you can reproduce it then it's likely a Yasson issue and it should be reported here: https://github.com/eclipse-ee4j/yasson/issues |
@gsmet I will give it a shot, but this week will be tough because my schedule is packed.
Yep, this bit of code generates the warning. I will open an issue on Yasson. |
This is needed when a JAX-RS resource returns a parameterized type that is meant to be an enclosing class Fixes: quarkusio#3538
Register enclosing class for reflection when used as JAX-RS return type
This is needed when a JAX-RS resource returns a parameterized type that is meant to be an enclosing class Fixes: quarkusio#3538
This is needed when a JAX-RS resource returns a parameterized type that is meant to be an enclosing class Fixes: quarkusio#3538
FYI I've delivered the fix for this issue in Yasson which will be included in the next release (1.0.6) |
@gsmet go ahead and assign this issue to me please. I can use it as a ticket to upgrade Quarkus to Yasson 1.0.6 when it gets released |
@aguibert any idea when 1.0.6 will be released ? |
@rsvoboda it's been a while since we released Yasson 1.0.5 so I suppose we're about due for a new release. I'll work on cutting a new Yasson release this week and getting Quarkus updated |
Using quarkus-resteasy-jsonb for my RESTful service
and with this class
Returned from this resource method:
The result from my GET request returns the correct payload, however, I get this warning in the log each time the request is made.
If I switch to quarkus-resteasy-jackson, the warning is not logged. ( however I have to include other dependencies to get "Instant" to serialize properly, and configure the ObjectMapper to use it... Then I end up with Maven warnings too... so I would prefer to stick with the jsonb dependency )
If I change my code to use an anonymous inner class, extending MyEnvelopeClass with the Generic type... the warning is not logged:
I can use this as a workaround, but I would rather fix the issue holistically rather than within every single Resource method we write.
Thanks!
-sean
Environment (please complete the following information):
Output of
uname -a
orver
:Darwin USMACEA013SSCOT 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64
Output of
java -version
:openjdk version "11.0.3" 2019-04-16
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.3+7)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.3+7, mixed mode)
GraalVM version (if different from Java):
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-20190711112007.graal.jdk8u-src-tar-gz-b08)
OpenJDK 64-Bit GraalVM CE 19.1.1 (build 25.222-b08-jvmci-19.1-b01, mixed mode)
Quarkus version or git rev:
<quarkus.version>0.20.0</quarkus.version>
The text was updated successfully, but these errors were encountered: