-
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
Vert.x QuarkusJacksonJsonCodec cannot serialize JSON from records in Native due to Jackson error #20490
Comments
For tracking down the source of the error, it would have been better to throw the exception from Jackson. Only the message is captured: The error stems from https://github.com/FasterXML/jackson-databind/blob/2.13/src/main/java/com/fasterxml/jackson/databind/jdk14/JDK14Util.java#L123 |
Note: I removed the use of |
Thanks for reporting. If you annotate Can you give it a shot? |
@geoand Unfortunately after adding @RegisterForReflection I get a native build error.
|
Seems to be a related issue oracle/graal#3125 |
Ok, I got it working, but this isn't an ideal situation:
For a developer simply wanting to use a
|
Indeed, that looks like the root cause. FWIW, GraalVM doesn't have proper support for post Java 11 native image build just yet, but hopefully that will arrive soon. |
#20510 should take care of it |
Describe the bug
When using Vert.x Web in native mode,
QuarkusJacksonJsonCodec
fails to serializerecord
objects to JSON. This seems to work OK when running in regular JRE.The error itself stems from Jackson
JDK14Util
. Here is where the error stems from in Jackson https://github.com/FasterXML/jackson-databind/blob/2.13/src/main/java/com/fasterxml/jackson/databind/jdk14/JDK14Util.java#L123Expected behavior
record
objects are serialized to JSON when using Quarkus native.Actual behavior
Stack trace
How to Reproduce?
Check out this branch: https://github.com/murphye/vertx-web-openapi-quarkus-petstore/tree/QuarkusJacksonJsonCodec-RecordComponents-Native
Check the logs and you will see the stack trace.
Output of
uname -a
orver
Darwin erics-mbp-2.lan 20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:31 PDT 2021; root:xnu-7195.141.2~5/RELEASE_X86_64 x86_64
Output of
java -version
No response
GraalVM version (if different from Java)
Using quay.io/quarkus/ubi-quarkus-native-image:21.2.0-java16
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: