[
https://issues.apache.org/jira/browse/ARROW-15192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Li resolved ARROW-15192.
------------------------------
Fix Version/s: 8.0.0
Resolution: Fixed
Issue resolved by pull request 12028
[https://github.com/apache/arrow/pull/12028]
> [Java] Allow use of Jackson 2.12 or higher
> ------------------------------------------
>
> Key: ARROW-15192
> URL: https://issues.apache.org/jira/browse/ARROW-15192
> Project: Apache Arrow
> Issue Type: Improvement
> Components: Java
> Reporter: Laurent Goujon
> Assignee: Laurent Goujon
> Priority: Major
> Labels: pull-request-available
> Fix For: 8.0.0
>
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> 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:
> {noformat}
> 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)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)