Uses of Class
tools.jackson.databind.DatabindException
Packages that use DatabindException
Package
Description
Basic data binding (mapping) functionality that
allows for reading JSON content into Java Objects (POJOs)
and JSON Trees (
JsonNode
), as well as
writing Java Objects and trees as JSON.Contains implementation classes of deserialization part of
data binding.
Package that contains standard value and key deserializer base classes
that Jackson both uses for its own implementations and offers for
module developers as convenient partial implementations.
-
Uses of DatabindException in tools.jackson.databind
Methods in tools.jackson.databind that return DatabindExceptionModifier and TypeMethodDescriptionprotected DatabindException
SerializationContext._mappingProblem
(Throwable t, String message, Object... msgArgs) static DatabindException
DatabindException.from
(JsonGenerator g, String msg) static DatabindException
DatabindException.from
(JsonGenerator g, String msg, Throwable problem) static DatabindException
DatabindException.from
(JsonParser p, String msg) static DatabindException
DatabindException.from
(JsonParser p, String msg, Throwable problem) static DatabindException
DatabindException.from
(DeserializationContext ctxt, String msg) static DatabindException
DatabindException.from
(DeserializationContext ctxt, String msg, Throwable problem) static DatabindException
DatabindException.from
(SerializationContext ctxt, String msg) static DatabindException
DatabindException.from
(SerializationContext ctxt, String msg, Throwable problem) DeserializationContext.instantiationException
(Class<?> instClass, String msg0) Helper method for constructing instantiation exception for specified type, to indicate that instantiation failed due to missing instantiator (creator; constructor or factory method).DeserializationContext.instantiationException
(Class<?> instClass, Throwable cause) Helper method for constructing instantiation exception for specified type, to indicate problem with physically constructing instance of specified class (missing constructor, exception from constructor)protected abstract DatabindException
DatabindContext.invalidTypeIdException
(JavaType baseType, String typeId, String extraDesc) Helper method for constructing exception to indicate that given type id could not be resolved to a valid subtype of specified base type.DeserializationContext.invalidTypeIdException
(JavaType baseType, String typeId, String extraDesc) SerializationContext.invalidTypeIdException
(JavaType baseType, String typeId, String extraDesc) DeserializationContext.missingInjectableValueException
(String msg, Object valueId, BeanProperty forProperty, Object beanInstance) DeserializationContext.missingTypeIdException
(JavaType baseType, String extraDesc) DeserializationContext.weirdKeyException
(Class<?> keyClass, String keyValue, String msg) Helper method for constructing exception to indicate that given JSON Object field name was not in format to be able to deserialize specified key type.DeserializationContext.weirdNativeValueException
(Object value, Class<?> instClass) Helper method for constructing exception to indicate that input JSON token of type "native value" (seeJsonToken.VALUE_EMBEDDED_OBJECT
) is of incompatible type (and there is no delegating creator or such to use) and cannot be used to construct value of specified type (usually POJO).DeserializationContext.weirdNumberException
(Number value, Class<?> instClass, String msg) Helper method for constructing exception to indicate that input JSON Number was not suitable for deserializing into given target type.DeserializationContext.weirdStringException
(String value, Class<?> instClass, String msgBase) Helper method for constructing exception to indicate that input JSON String was not suitable for deserializing into given target type.DeserializationContext.wrongTokenException
(JsonParser p, Class<?> targetType, JsonToken expToken, String extra) DeserializationContext.wrongTokenException
(JsonParser p, JavaType targetType, JsonToken expToken, String extra) Helper method for constructingDatabindException
to indicate that the token encountered was of type different than what should be seen at that position, usually within a sequence of expected tokens.Methods in tools.jackson.databind that throw DatabindExceptionModifier and TypeMethodDescriptionprotected ValueDeserializer<Object>
ObjectReader._findRootDeserializer
(DeserializationContext ctxt) Method called to locate deserializer for the passed root-level value.protected ValueDeserializer<Object>
ObjectReader._findTreeDeserializer
(DeserializationContext ctxt) protected <T> T
DatabindContext._throwNotASubtype
(JavaType baseType, String subType) protected <T> T
DatabindContext._throwSubtypeClassNotAllowed
(JavaType baseType, String subType, PolymorphicTypeValidator ptv) protected <T> T
DatabindContext._throwSubtypeNameNotAllowed
(JavaType baseType, String subType, PolymorphicTypeValidator ptv) void
DeserializationContext.handleBadMerge
(ValueDeserializer<?> deser) Method that deserializer may call if it is called to do an update ("merge") but deserializer operates on a non-mergeable type.<T> T
DeserializationContext.reportBadCoercion
(ValueDeserializer<?> src, Class<?> targetType, Object inputValue, String msg, Object... msgArgs) Helper method used to indicate a problem with input in cases where specific input coercion was not allowed.<T> T
DatabindContext.reportBadDefinition
(Class<?> type, String msg) abstract <T> T
DatabindContext.reportBadDefinition
(JavaType type, String msg) Helper method called to indicate a generic problem that stems from type definition(s), not input data, or input/output state; typically this means throwing aInvalidDefinitionException
.<T> T
DeserializationContext.reportBadDefinition
(JavaType type, String msg) <T> T
SerializationContext.reportBadDefinition
(Class<?> raw, String msg, Throwable cause) <T> T
SerializationContext.reportBadDefinition
(JavaType type, String msg) <T> T
SerializationContext.reportBadDefinition
(JavaType type, String msg, Throwable cause) <T> T
DeserializationContext.reportBadPropertyDefinition
(BeanDescription.Supplier beanDescRef, BeanPropertyDefinition prop, String msg, Object... msgArgs) Helper method called to indicate problem in POJO (serialization) definitions or settings regarding specific property (of a type), unrelated to actual JSON content to map.<T> T
DeserializationContext.reportBadPropertyDefinition
(BeanDescription bean, BeanPropertyDefinition prop, String msg, Object... msgArgs) <T> T
SerializationContext.reportBadPropertyDefinition
(BeanDescription bean, BeanPropertyDefinition prop, String message, Object... msgArgs) Helper method called to indicate problem in POJO (serialization) definitions or settings regarding specific property (of a type), unrelated to actual JSON content to map.<T> T
DatabindContext.reportBadTypeDefinition
(BeanDescription.Supplier beanDescRef, String msg, Object... msgArgs) abstract <T> T
DatabindContext.reportBadTypeDefinition
(BeanDescription bean, String msg, Object... msgArgs) <T> T
DeserializationContext.reportBadTypeDefinition
(BeanDescription bean, String msg, Object... msgArgs) Helper method called to indicate problem in POJO (serialization) definitions or settings regarding specific Java type, unrelated to actual JSON content to map.<T> T
SerializationContext.reportBadTypeDefinition
(BeanDescription bean, String msg, Object... msgArgs) Helper method called to indicate problem in POJO (serialization) definitions or settings regarding specific Java type, unrelated to actual JSON content to map.<T> T
DeserializationContext.reportInputMismatch
(Class<?> targetType, String msg, Object... msgArgs) Helper method used to indicate a problem with input in cases where more specificreportXxx()
method was not available.<T> T
DeserializationContext.reportInputMismatch
(BeanProperty prop, String msg, Object... msgArgs) Helper method used to indicate a problem with input in cases where more specificreportXxx()
method was not available.<T> T
DeserializationContext.reportInputMismatch
(JavaType targetType, String msg, Object... msgArgs) Helper method used to indicate a problem with input in cases where more specificreportXxx()
method was not available.<T> T
DeserializationContext.reportInputMismatch
(ValueDeserializer<?> src, String msg, Object... msgArgs) Helper method used to indicate a problem with input in cases where more specificreportXxx()
method was not available.void
SerializationContext.reportMappingProblem
(String message, Object... msgArgs) Helper method called to indicate problem; default behavior is to construct and throw aDatabindException
, but in future may collect more than one and only throw after certain number, or at the end of serialization.void
SerializationContext.reportMappingProblem
(Throwable t, String message, Object... msgArgs) Helper method called to indicate problem; default behavior is to construct and throw aDatabindException
, but in future may collect more than one and only throw after certain number, or at the end of serialization.<T> T
DeserializationContext.reportPropertyInputMismatch
(Class<?> targetType, String propertyName, String msg, Object... msgArgs) Helper method used to indicate a problem with input in cases where more specificreportXxx()
method was not available.<T> T
DeserializationContext.reportPropertyInputMismatch
(JavaType targetType, String propertyName, String msg, Object... msgArgs) Helper method used to indicate a problem with input in cases where more specificreportXxx()
method was not available.<T> T
DeserializationContext.reportTrailingTokens
(Class<?> targetType, JsonParser p, JsonToken trailingToken) <T> T
DeserializationContext.reportUnresolvedObjectId
(ObjectIdReader oidReader, Object bean) void
DeserializationContext.reportWrongTokenException
(Class<?> targetType, JsonToken expToken, String msg, Object... msgArgs) Method for deserializers to call when the token encountered was of type different than what should be seen at that position, usually within a sequence of expected tokens.void
DeserializationContext.reportWrongTokenException
(JavaType targetType, JsonToken expToken, String msg, Object... msgArgs) Method for deserializers to call when the token encountered was of type different than what should be seen at that position, usually within a sequence of expected tokens.void
DeserializationContext.reportWrongTokenException
(ValueDeserializer<?> deser, JsonToken expToken, String msg, Object... msgArgs) Method for deserializers to call when the token encountered was of type different than what should be seen at that position, usually within a sequence of expected tokens. -
Uses of DatabindException in tools.jackson.databind.deser
Subclasses of DatabindException in tools.jackson.databind.deserModifier and TypeClassDescriptionclass
Exception thrown during deserialization when there are object id that can't be resolved. -
Uses of DatabindException in tools.jackson.databind.deser.bean
Methods in tools.jackson.databind.deser.bean that return DatabindExceptionModifier and TypeMethodDescriptionBeanDeserializerBase.wrapAndThrow
(Throwable t, Object bean, String fieldName, DeserializationContext ctxt) Method that will modify caught exception (passed in as argument) as necessary to include reference information, and to ensure it is a subtype ofDatabindException
, or an unchecked exception.Methods in tools.jackson.databind.deser.bean that throw DatabindExceptionModifier and TypeMethodDescriptionprotected final Object
BeanDeserializer._deserializeWithErrorWrapping
(JsonParser p, DeserializationContext ctxt, SettableBeanProperty prop) protected Object
PropertyValueBuffer._findMissing
(SettableBeanProperty prop) PropertyValueBuffer.getParameter
(DeserializationContext ctxt, SettableBeanProperty prop) A variation ofPropertyValueBuffer.getParameters(tools.jackson.databind.DeserializationContext, tools.jackson.databind.deser.SettableBeanProperty[])
that accepts a single property.Object[]
PropertyValueBuffer.getParameters
(DeserializationContext ctxt, SettableBeanProperty[] props) Method called to do necessary post-processing such as injection of values and verification of values for required properties, after eitherPropertyValueBuffer.assignParameter(SettableBeanProperty, Object)
returnstrue
(to indicate all creator properties are found), or when the whole JSON Object has been processed, -
Uses of DatabindException in tools.jackson.databind.deser.std
Methods in tools.jackson.databind.deser.std that return DatabindExceptionModifier and TypeMethodDescriptionprotected DatabindException
StdValueInstantiator.rewrapCtorProblem
(DeserializationContext ctxt, Throwable t) Method that subclasses may call for standard handling of an exception thrown when calling constructor or factory method.protected DatabindException
StdValueInstantiator.wrapAsDatabindException
(DeserializationContext ctxt, Throwable t) Helper method that will return givenThrowable
case as aDatabindException
(if it is of that type), or callDeserializationContext.instantiationException(Class, Throwable)
to produce and return suitableDatabindException
.Methods in tools.jackson.databind.deser.std that throw DatabindExceptionModifier and TypeMethodDescriptionprotected void
StdDeserializer._reportFailedNullCoerce
(DeserializationContext ctxt, boolean state, Enum<?> feature, String inputDesc) protected final void
StdDeserializer._verifyNullForPrimitive
(DeserializationContext ctxt) Method called to verify thatnull
token from input is acceptable for primitive (unboxed) target type.protected final void
StdDeserializer._verifyNullForPrimitiveCoercion
(DeserializationContext ctxt, String str) Method called to verify that text value"null"
from input is acceptable for primitive (unboxed) target type. -
Uses of DatabindException in tools.jackson.databind.exc
Subclasses of DatabindException in tools.jackson.databind.excModifier and TypeClassDescriptionclass
SpecializedDatabindException
sub-class used to indicate case where an explicitly ignored property is encountered, and mapper is configured to consider this an error.class
Intermediate exception type used as the base class for allDatabindException
s that are due to problems with target type definition; usually a problem with annotations used on a class or its properties.class
Specialized sub-class ofMismatchedInputException
that is used when the underlying problem appears to be that of bad formatting of a value to deserialize.class
Exception thrown if a `null` value is being encountered for a property designed as "fail on null" property (seeJsonSetter
).class
Exception thrown when resolution of a type id fails.class
class
General exception type used as the base class for allDatabindException
s that are due to input not mapping to target definition; these are typically considered "client errors" since target type definition itself is not the root cause but mismatching input.class
class
Base class forMismatchedInputException
s that are specifically related to problems related to binding an individual property.class
SpecializedPropertyBindingException
sub-class specifically used to indicate problems due to encountering a JSON property that could not be mapped to an Object property (via getter, constructor argument or field).class
Exception type used for generic failures during processing byValueInstantiator
: commonly used to wrap exceptions thrown by constructor or factory method.