Test to reproduce 07da0ea27aafa2598066298af2adc70bf7fd1042
I have event in newer version of schema and I want to deserialize it with older version. Newer schema has additional field which might be null. During deserialization there is NullPointerException :
java.lang.NullPointerException
at com.fasterxml.jackson.dataformat.avro.deser.UnionReader._decodeIndex(UnionReader.java:63)
at com.fasterxml.jackson.dataformat.avro.deser.UnionReader.skipValue(UnionReader.java:45)
at com.fasterxml.jackson.dataformat.avro.deser.AvroFieldReader$Structured.skipValue(AvroFieldReader.java:61)
at com.fasterxml.jackson.dataformat.avro.deser.RecordReader$Resolving.nextFieldName(RecordReader.java:222)
at com.fasterxml.jackson.dataformat.avro.deser.AvroParserImpl.nextFieldName(AvroParserImpl.java:110)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:294)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)
at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1608)
at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1185)
at com.fasterxml.jackson.dataformat.avro.schemaev.ErrorReproduceTest.testShouldDeserialize(ErrorReproduceTest.java:72)
NullPointer occures when new field has UnionType null and one of(Record, Map, Array).
Version
2.9.0
and2.9.8
Test to reproduce 07da0ea27aafa2598066298af2adc70bf7fd1042
I have event in newer version of schema and I want to deserialize it with older version. Newer schema has additional field which might be null. During deserialization there is
NullPointerException
:NullPointer occures when new field has UnionType
null
and one of(Record, Map, Array)
.Newer schema which has additional field:
Older Schema:
I serialize event with newer schema and later I want to deserialize with older schema
Do you have any idea how can I configure mapper to avoid this problem or it has to be fixed?