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

Fix createDocument when error occurs during DOCUMENT_CREATED event's listener execution

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.10, 9.10
    • Fix Version/s: 10.2
    • Component/s: Automation, Core
    • Release Notes Summary:
      An error during document creation will not display a message indicating that the document was successfully created.
    • Tags:
    • Backlog priority:
      700
    • Sprint:
      nxGang Sprint 10.2.6
    • Story Points:
      2

      Description

      Currently when an error occurs during a document creation through WebUI, a message is displayed and indicates that the document was successfully created whereas the page also displays an error HTTP 404 Page not found.

      This can be reproduced by setting an Event Handler which calls an Automation which will set a property with an incorrect xpath.

      ERROR [http-nio-0.0.0.0-8080-exec-1] [org.nuxeo.ecm.automation.core.events.OperationEventListener] Failed to handle event documentCreated using chain: setWrongProps
      org.nuxeo.ecm.core.api.model.PropertyNotFoundException: Failed to invoke operation Document.SetProperty, note:note
      	at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.getProperty(DocumentModelImpl.java:1261)
      	at org.nuxeo.ecm.automation.core.operations.document.SetDocumentProperty.run(SetDocumentProperty.java:58)
      	at sun.reflect.GeneratedMethodAccessor313.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.doInvoke(InvokableMethod.java:173)
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:178)
      	at org.nuxeo.ecm.automation.core.impl.OperationChainCompiler$OperationMethod.invoke(OperationChainCompiler.java:151)
      	at org.nuxeo.ecm.automation.core.impl.OperationChainCompiler$OperationMethod.invoke(OperationChainCompiler.java:158)
      	at org.nuxeo.ecm.automation.core.impl.OperationChainCompiler$OperationMethod.invoke(OperationChainCompiler.java:158)
      	at org.nuxeo.ecm.automation.core.impl.OperationChainCompiler$OperationMethod.invoke(OperationChainCompiler.java:158)
      	at org.nuxeo.ecm.automation.core.impl.OperationChainCompiler$OperationMethod.invoke(OperationChainCompiler.java:158)
      	at org.nuxeo.ecm.automation.core.impl.OperationChainCompiler$OperationMethod.invoke(OperationChainCompiler.java:158)
      	at org.nuxeo.ecm.automation.core.impl.OperationChainCompiler$OperationMethod.invoke(OperationChainCompiler.java:158)
      	at org.nuxeo.ecm.automation.core.impl.OperationChainCompiler$CompiledChainImpl.lambda$invoke$0(OperationChainCompiler.java:218)
      	at org.nuxeo.ecm.automation.OperationContext.call(OperationContext.java:326)
      	at org.nuxeo.ecm.automation.OperationContext.callWithChainParameters(OperationContext.java:291)
      	at org.nuxeo.ecm.automation.core.impl.OperationChainCompiler$CompiledChainImpl.invoke(OperationChainCompiler.java:215)
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:115)
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:91)
      	at org.nuxeo.ecm.automation.core.events.EventHandlerRegistry.handleEvent(EventHandlerRegistry.java:132)
      	at org.nuxeo.ecm.automation.core.events.OperationEventListener.handleEvent(OperationEventListener.java:40)
      	at org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent(EventServiceImpl.java:242)
      	at org.nuxeo.ecm.core.api.AbstractSession.notifyEvent(AbstractSession.java:271)
      	at org.nuxeo.ecm.core.api.AbstractSession.createDocument(AbstractSession.java:733)
      	at org.nuxeo.ecm.restapi.server.jaxrs.JSONDocumentObject.doPost(JSONDocumentObject.java:105)
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours, 15 minutes
                  4h 15m