Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-15192

[Java] Allow use of Jackson 2.12 or higher

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 8.0.0
    • Java

    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

          Activity

            People

              laurent Laurent Goujon
              laurent Laurent Goujon
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 50m
                  1h 50m