-
Type: Bug
-
Status: Resolved
-
Priority: Detail
-
Resolution: Fixed
-
Affects Version/s: 9.10
-
Component/s: Events / Works
-
Tags:
-
Sprint:nxFG 10.3.4
The method `openSystemSession` of the `AbstractWork` class is a shorcut to the method `CoreInstance.openCoreSessionSystem(null, null)`. But if the second parameter (originatingUsername) is not filled, its throws a NullPointerException (see stack below) during the documents saving (contributor = null).
A possible fix could be adding a 'isNotBlank' check here:
https://github.com/nuxeo/nuxeo/blob/master/nuxeo-core/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/api/CoreInstance.java#L113
2018-08-08 14:54:03,965 ERROR [EventServiceImpl] Exception during dclistener sync listener execution, continuing to run other listeners java.lang.NullPointerException at org.nuxeo.ecm.platform.dublincore.service.DublinCoreStorageService.stripPrincipalPrefix(DublinCoreStorageService.java:119) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) at org.nuxeo.ecm.platform.dublincore.service.DublinCoreStorageService.getSanitizedExistingContributors(DublinCoreStorageService.java:115) at org.nuxeo.ecm.platform.dublincore.service.DublinCoreStorageService.addContributor(DublinCoreStorageService.java:89) at org.nuxeo.ecm.platform.dublincore.listener.DublinCoreListener.handleEvent(DublinCoreListener.java:147) at org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent(EventServiceImpl.java:243) at org.nuxeo.ecm.core.api.AbstractSession.notifyEvent(AbstractSession.java:271) at org.nuxeo.ecm.core.api.AbstractSession.createDocument(AbstractSession.java:733) at com.santander.nuxeo.services.ImporterServiceImpl.createBatch(ImporterServiceImpl.java:153) at com.santander.nuxeo.services.ImporterServiceImpl.scanBatchFolder(ImporterServiceImpl.java:128) at com.santander.nuxeo.works.ScanBatchFolderWork.work(ScanBatchFolderWork.java:46) at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:435) at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:355) 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)
- is related to
-
NXP-25005 contributor appears multiple times with a user prefix when attaching files
- Resolved