异常源代码
抛出异常的地方是BeanDeserializerBase中的deserializeFromObjectUsingNonDefault()方法
protected Object deserializeFromObjectUsingNonDefault(JsonParser p, DeserializationContext ctxt) throws IOException {
JsonDeserializer<Object> delegateDeser = this._delegateDeserializer();
if (delegateDeser != null) {
return this._valueInstantiator.createUsingDelegate(ctxt, delegateDeser.deserialize(p, ctxt));
} else if (this._propertyBasedCreator != null) {
return this._deserializeUsingPropertyBased(p, ctxt);
} else {
return this._beanType.isAbstract() ? ctxt.handleMissingInstantiator(this.handledType(), p, "abstract type (need to add/enable type information?)", new Object[0]) : ctxt.handleMissingInstantiator(this._beanType.getRawClass(), p, "no suitable constructor found, can not deserialize from Object value (missing default constructor or creator, or perhaps need to add/enable type information?)", new Object[0]);
}
}
分析
从返回的英文信息来看,应该是“没有合适的构造函数”引起的。但是实体类中又存在构造函数,但是没有无参构造函数,猜想应该是没有无参构造函数引起的。