You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in 2.12.0 I got this stacktrace (and DeserializationProblemHandler is not called)
com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `java.lang.String` from Object value (token `JsonToken.START_OBJECT`)
at [Source: de.undercouch.bson4jackson.io.LittleEndianInputStream@2c7d121c; pos: 24] (through reference chain: org.litote.kmongo.issues.Issue85ObjectIdIsNotProperlyDeserializedInAStringPropertyWhenPropertyIsInherited$MainData["_id"])
at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:63)
at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1590)
at com.fasterxml.jackson.databind.DeserializationContext.extractScalarFromObject(DeserializationContext.java:872)
at com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:62)
at com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:11)
at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:542)
at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeWithErrorWrapping(BeanDeserializer.java:565)
Version information
Which Jackson version(s) was this for? 2.12.0
2.11.3 is ok
Thank you for reporting this: sounds like a regression in that DeserializationProblemHandler.handleUnexpectedToken(..) used to be called earlier but now new default extractScalarFromObject does not call it.
cowtowncoder
changed the title
DeserializationProblemHandler is not invoked when trying to deserializing String (regression in 2.12.0)
DeserializationProblemHandler is not invoked when trying to deserializing String
Dec 9, 2020
Describe the bug
KMongo (https://github.com/Litote/kmongo) uses DeserializationProblemHandler in order to patch some unexpected deserialization issue (see https://github.com/Litote/kmongo/blob/master/kmongo-jackson-mapping/src/main/kotlin/org/litote/kmongo/jackson/StringDeserializationProblemHandler.kt#L38 )
in 2.12.0 I got this stacktrace (and DeserializationProblemHandler is not called)
Version information
Which Jackson version(s) was this for? 2.12.0
2.11.3 is ok
To Reproduce
This KMongo test fails: https://github.com/Litote/kmongo/blob/master/kmongo/src/test/kotlin/org/litote/kmongo/issues/Issue85ObjectIdIsNotProperlyDeserializedInAStringPropertyWhenPropertyIsInherited.kt#L70
Expected behavior
DeserializationProblemHandler invoked
Additional context
Digging in the code (StringDeserializer line 61):
The text was updated successfully, but these errors were encountered: