-
Notifications
You must be signed in to change notification settings - Fork 34
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
Description
Describe the bug
If the JavaTimeModule class is available, I expect the ObjectMapper used by quarkus-logging-json to register it as a module.
That does not happen in native build.
Expected behavior
If the JavaTimeModule class is available, I expect the ObjectMapper used by quarkus-logging-json to register it as a module.
Actual behavior
This exception is thrown:
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Java 8 date/time type `java.time.Instant` not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling
How to Reproduce?
A simple code to test:
Map<String, Object> event = new HashMap<>();
event.put("time", Instant.now());
log.info("Test msg", kv("event", event));
That will not dump any json message and will log an error that jsr310 should be registered.
Output of uname -a or ver
5.15.0-86-generic #96-Ubuntu SMP Wed Sep 20 08:23:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Output of java -version
openjdk 17.0.8.1 2023-08-24
Mandrel or GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.2.6.Final
Build tool (ie. output of mvnw --version or gradlew --version)
No response
Additional information
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed