ERROR - org.bson.codecs.configuration.CodecConfigurationException - Possible Causes of CodecConfigurationException

Exception Thrown By:Cause
ClassMethod
Document public String toJson() if the document contains types not in the default
registry.
Document public String toJson(JsonWriterSettings writerSettings) if the document contains types not in the default
registry.
Document public String toJson(Encoder encoder) if the registry does not
contain a codec for the document values.