以下函数中出现异常。
我们有一个由两名成员组成的Pojo
私人地图<字符串,列表
私有映射<字符串,列表<对象>> myInnerParam;
调试显示以下函数引发异常(CodecConfigurationException)
private void specialize() {
if (specialized) {
codecCache.put(classModel, this); for
(PropertyModel<?> propertyModel :
classModel.getPropertyModels()) { try {
addToCache(propertyModel); } catch (Exception e)
{
throw new
CodecConfigurationException(format("Could not
create a PojoCodec for '%s'." + " Property '%s'
errored with: %s", classModel.getName(),
propertyModel.getName(), e.getMessage()), e); }
}
}
}
上述函数中PropertyModel的值。
propertyModel = {PropertyModel@10278} "PropertyModel{propertyName='myInnerParam', readName='myInnerParam', writeName='myInnerParam', typeData=TypeData{type=Map, typeParameters=[String, List<Object>]}}"
name = "myInnerParam"
readName = "myInnerParam"
writeName = "myInnerParam"
typeData = {TypeData@10350} "TypeData{type=Map, typeParameters=[String, List<Object>]}"
codec = null
propertySerialization = {PropertyModelSerializationImpl@10351}
useDiscriminator = null
propertyAccessor = {PropertyAccessorImpl@10352}
cachedCodec = null
例外
e = {CodecConfigurationException@11668} "org.bson.codecs.configuration.CodecConfigurationException: Can't find a codec for class java.lang.Object."
detailMessage = "Can't find a codec for class java.lang.Object."
value = {char[46]@11905}
hash = 0
cause = {CodecConfigurationException@11668} "org.bson.codecs.configuration.CodecConfigurationException: Can't find a codec for class java.lang.Object."
detailMessage = "Can't find a codec for class java.lang.Object."
cause = {CodecConfigurationException@11668} "org.bson.codecs.configuration.CodecConfigurationException: Can't find a codec for class java.lang.Object."
stackTrace = {StackTraceElement[0]@11901}
suppressedExceptions = {Collections$UnmodifiableRandomAccessList@11902} size = 0
stackTrace = {StackTraceElement[0]@11901}
suppressedExceptions = {Collections$UnmodifiableRandomAccessList@11902} size = 0
这对我们来说是一个障碍-我们无法前进。您能否建议解决方法-如果要花很长时间解决这个问题。
我们正在使用mongodb-driver-reactivestreams(1.8.0)/ mongodb-driver-core(3.7.0)/ bson-3.7.0