-
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
Records with polymorphic types sent from native clients received with no data #37942
Labels
area/jackson
Issues related to Jackson (JSON library)
area/native-image
kind/bug
Something isn't working
Milestone
Comments
/cc @zakkak (native-image) |
FYI @geoand |
Thanks! I'll have a look next week |
galderz
added a commit
to galderz/fibula
that referenced
this issue
Dec 29, 2023
geoand
added a commit
to geoand/quarkus
that referenced
this issue
Jan 3, 2024
#37993 fixes the issue |
geoand
added a commit
to geoand/quarkus
that referenced
this issue
Jan 3, 2024
geoand
added a commit
that referenced
this issue
Jan 3, 2024
Register JsonSubTypes.Type values for native mode
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
Jan 9, 2024
Fixes: quarkusio#37942 (cherry picked from commit a110cea)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/jackson
Issues related to Jackson (JSON library)
area/native-image
kind/bug
Something isn't working
Describe the bug
Sending records that include polymorphic types from a native Quarkus app using rest-client to a jvm Quarkus app contains empty data.
The data model uses
com.fasterxml.jackson.annotation.JsonSubTypes
andcom.fasterxml.jackson.annotation.JsonTypeInfo
to handle polymorphism, and the types in the reproducer look like this:Expected behavior
Records with polymorphic subtypes should contain all the information when received by the server. E.g.
Actual behavior
Records with polymorphic subtypes are received by the server but they contain no data:
How to Reproduce?
mvn install -DskipTests && mvn quarkus:run -pl server
mvn install -DskipTests -Dnative -pl client && ./client/target/client-1.0.0-SNAPSHOT-runner
In contrast, if the client is running in JVM mode, it all works as expected:
mvn install -DskipTests && mvn quarkus:run -pl server
mvn quarkus:run -pl server -pl client
Output of
uname -a
orver
No response
Output of
java -version
OpenJDK Runtime Environment GraalVM CE 21+35.1 (build 21+35-jvmci-23.1-b15)
Quarkus version or git rev
3.6.4
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
Avoiding polymorphism can be a temporary workaround if the application supports it.
The text was updated successfully, but these errors were encountered: