org.nuxeo.ecm.core.model.DocumentModelResolver throws an exception when called from an asynchronous worker which uses a system session
2018-06-18 09:19:52,488 ERROR [Nuxeo-Work-default-4] [org.nuxeo.ecm.core.work.WorkManagerImpl] Uncaught error on thread: Nuxeo-Work-default-4, current work might be lost, WorkManager metrics might be corrupted. org.nuxeo.ecm.core.api.NuxeoException: Work failed after 0 retries, class=class org.nuxeo.labs.lambda.rekognition.worker.ImageRekognitionResultWork id=default:66dc94a9-0774-45bd-99f0-ec92caa4f036:ingest-image-rekognition category=ImageRekognitionResultWork title=default:66dc94a9-0774-45bd-99f0-ec92caa4f036:ingest-image-rekognition at org.nuxeo.ecm.core.work.AbstractWork.workFailed(AbstractWork.java:410) at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:367) at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:57) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.nuxeo.ecm.core.api.NuxeoException: Cannot create a CoreSession outside a security context, login() missing. at org.nuxeo.ecm.core.api.CoreInstance.getPrincipal(CoreInstance.java:220) at org.nuxeo.ecm.core.api.CoreInstance.openCoreSession(CoreInstance.java:71) at org.nuxeo.ecm.core.model.DocumentModelResolver.validate(DocumentModelResolver.java:148) at org.nuxeo.ecm.core.schema.types.constraints.ObjectResolverConstraint.validate(ObjectResolverConstraint.java:56) at org.nuxeo.ecm.core.api.validation.DocumentValidationServiceImpl.validateSimpleTypeField(DocumentValidationServiceImpl.java:291) at org.nuxeo.ecm.core.api.validation.DocumentValidationServiceImpl.validateListTypeProperty(DocumentValidationServiceImpl.java:481) at org.nuxeo.ecm.core.api.validation.DocumentValidationServiceImpl.validateAnyTypeProperty(DocumentValidationServiceImpl.java:381) at org.nuxeo.ecm.core.api.validation.DocumentValidationServiceImpl.validate(DocumentValidationServiceImpl.java:126) at org.nuxeo.ecm.core.api.AbstractSession.saveDocument(AbstractSession.java:1536) at org.nuxeo.labs.lambda.rekognition.worker.ImageRekognitionResultWork.work(ImageRekognitionResultWork.java:75) at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:435) at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:355) ... 4 more
- is related to
-
NXP-22450 Allow bare document references without repository name
- Resolved