-
Notifications
You must be signed in to change notification settings - Fork 96
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
Issue with @JsonbCreator constructor with Generic Type in Yasson 3.0.0 and higher #599
Comments
The first commit where this error gets thrown is b74033d |
It seems we are facing the same issue using Yasson 3.0.2 (which ships with WildFly 30):
In our case the Java data class in question which Yasson is trying to deserialize is:
Is there a workaround for this issue? We cannot just downgrade Yasson because Yasson 3 is used internally by WildFly a lot as well it seems. |
@edgarvonk Possible workaround was brought up here: smallrye/smallrye-graphql#1819 (comment) |
Thanks @mskacelik ! It seems to do the trick indeed. A rather cumbersome workaround for us however since our code base is large with quite a huge number of Java value classes that do not implement an interface nor extend from an abstract class which are used as generic types in JSON deserialisation.. |
There seems to be a bug in Yasson version 3.0.0 and higher that affects the
@JsonbCreator
constructor when it has a Generic Type parameter. This issue is not present in Yasson version 2.0.4.Stack trace from the reproducer (version 3.0.0 and higher):
Reproducer using JBang:
Switching yasson's version (line starting
//DEPS
) from 3.0.3 to 2.0.4 resolves the issue.JBang documentation and how to download it: https://www.jbang.dev/
The text was updated successfully, but these errors were encountered: