When a null value is stored in MongoDB, it will raise an exception when reading the corresponding metadata:
ERROR [Nuxeo-Work-173] [org.nuxeo.ecm.core.event.impl.EventServiceImpl] Exception during checkListener sync listener execution, other listeners will be ignored java.lang.ClassCastException: [Lcom.mongodb.BasicDBObject; cannot be cast to java.util.List at org.nuxeo.ecm.core.storage.dbs.DBSDocument.getChildAsList(DBSDocument.java:399) at org.nuxeo.ecm.core.storage.dbs.DBSDocument.getChildAsList(DBSDocument.java:80) at org.nuxeo.ecm.core.storage.BaseDocument.readComplexProperty(BaseDocument.java:674) at org.nuxeo.ecm.core.storage.dbs.DBSDocument.readDocumentPart(DBSDocument.java:837) at org.nuxeo.ecm.core.api.DocumentModelFactory.createDataModel(DocumentModelFactory.java:201) at org.nuxeo.ecm.core.api.AbstractSession.getDataModel(AbstractSession.java:1982)
The above stacktrace corresponds to the case when the first value of a list is null.
As we don't understand yet how the null value was stored, we could provide a workaround not to raise a ClassCastException when retrieving the value from MongoDB.
- is related to
-
NXP-21392 Fix document update for list of complex type elements
- Open