Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-17839

Allow lock of MongoDB created document before initial save

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.4
    • Component/s: Core MongoDB

      Description

      If a document is created but not yet saved, attempting to set a lock on if fails:

      2015-09-13 00:46:05,180 ERROR [localhost-startStop-1] [org.nuxeo.ecm.core.event.impl.EventServiceImpl] Exception during routeCreatedListener sync listener execution, continuing to run other listeners
      org.nuxeo.ecm.core.api.LockException: Cannot lock non-existing document: 91d09f45-73d4-41e3-b0d3-dc6ec2e5a8ae
              at org.nuxeo.ecm.core.storage.mongodb.MongoDBRepository.setLock(MongoDBRepository.java:849)
              at org.nuxeo.ecm.core.storage.BaseDocument.setLock(BaseDocument.java:1062)
              at org.nuxeo.ecm.core.api.AbstractSession.setLock(AbstractSession.java:2102)
              at org.nuxeo.ecm.core.api.impl.DocumentModelImpl$2.run(DocumentModelImpl.java:689)
              at org.nuxeo.ecm.core.api.impl.DocumentModelImpl$2.run(DocumentModelImpl.java:686)
              at org.nuxeo.ecm.core.api.impl.DocumentModelImpl$RunWithCoreSession.execute(DocumentModelImpl.java:389)
              at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.setLock(DocumentModelImpl.java:691)
              at org.nuxeo.ecm.platform.routing.core.listener.DocumentRouteCreationListener.handleEvent(DocumentRouteCreationListener.java:39)
              at org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent(EventServiceImpl.java:191)
              at org.nuxeo.ecm.core.api.AbstractSession.notifyEvent(AbstractSession.java:264)
              at org.nuxeo.ecm.core.api.AbstractSession.createDocument(AbstractSession.java:694)
              at org.nuxeo.ecm.core.io.impl.AbstractDocumentModelWriter.createDocument(AbstractDocumentModelWriter.java:143)
              at org.nuxeo.ecm.core.io.impl.plugins.DocumentModelWriter.doWrite(DocumentModelWriter.java:81)
              at org.nuxeo.ecm.core.io.impl.plugins.DocumentModelWriter.write(DocumentModelWriter.java:68)
              at org.nuxeo.ecm.core.io.impl.AbstractDocumentWriter.write(AbstractDocumentWriter.java:46)
              at org.nuxeo.ecm.core.io.impl.DocumentPipeImpl.readAndWriteDocs(DocumentPipeImpl.java:120)
              at org.nuxeo.ecm.core.io.impl.DocumentPipeImpl.run(DocumentPipeImpl.java:95)
              at org.nuxeo.ecm.platform.routing.core.persistence.RouteModelsZipImporter.create(RouteModelsZipImporter.java:92)
              at org.nuxeo.ecm.platform.filemanager.service.FileManagerService.createDocumentFromBlob(FileManagerService.java:218)
              at org.nuxeo.ecm.platform.routing.core.impl.DocumentRoutingServiceImpl.importRouteModel(DocumentRoutingServiceImpl.java:673)
              at org.nuxeo.ecm.platform.routing.core.impl.DocumentRoutingServiceImpl.importAllRouteModels(DocumentRoutingServiceImpl.java:659)
              at org.nuxeo.ecm.platform.routing.core.listener.RouteModelsInitializator.doInitializeRepository(RouteModelsInitializator.java:37)
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: