Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
Since Jackson 2.12, serializers/deserializers for java.time.* are not enabled by default and need to be enabled back by adding the jackson jsr310 optional module.
As the ObjectMapper instances used by json classes in the vector module do not include the extra jackson module, this precludes Arrow vector library to be used with Jackson 2.12 or higher.
Here's an example of the error generated by Arrow when used with Jackson 2.12:
java.lang.IllegalStateException: Cannot serialize hash map to JSON string at org.apache.arrow.vector.ipc.TestJSONFile.testWriteReadComplexJSON(TestJSONFile.java:125) Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Java 8 date/time type `java.time.LocalDateTime` not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling (through reference chain: org.apache.arrow.vector.util.JsonStringHashMap["timestamp"]) at org.apache.arrow.vector.ipc.TestJSONFile.testWriteReadComplexJSON(TestJSONFile.java:125)
Attachments
Issue Links
- is related to
-
ARROW-16143 [Java] Upgrade jackson dependencies
- Resolved
- links to