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

Fix NPE when activating Automation traces

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 8.10
    • Fix Version/s: 9.3
    • Component/s: Automation

      Description

      When activating automation traces via Automation Traces.ToggleRecording, the trace engine is recording a lite trace of this execution (meaning only the name, few information).

      But at the end of the execution, the traces are activated and the trace system is printing the recorded calls like it was already activated before this execution:

      The trace engine cannot print some information not recorded -> NPE.

      Stack in 8.10 (but reproducible as well in 9.3-SNAPSHOT)

      2017-11-03 14:47:22,223 WARN  [http-bio-0.0.0.0-8080-exec-18] [org.nuxeo.ecm.webengine.app.WebEngineExceptionMapper] Exception in JAX-RS processing
      java.lang.NullPointerException
          at org.nuxeo.ecm.automation.core.trace.TracePrinter.printCall(TracePrinter.java:142)
          at org.nuxeo.ecm.automation.core.trace.TracePrinter.print(TracePrinter.java:120)
          at org.nuxeo.ecm.automation.core.trace.TracePrinter.print(TracePrinter.java:115)
          at org.nuxeo.ecm.automation.core.trace.TracePrinter.print(TracePrinter.java:109)
          at org.nuxeo.ecm.automation.core.trace.Trace.getFormattedText(Trace.java:99)
          at org.nuxeo.ecm.automation.core.trace.BasedTracer.getFormattedText(BasedTracer.java:112)
          at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:222)
          at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:121)
          at org.nuxeo.ecm.automation.server.jaxrs.OperationResource.execute(OperationResource.java:58)
          at org.nuxeo.ecm.automation.server.jaxrs.ExecutableResource.doPost(ExecutableResource.java:68)
      

      The idea would be to skip for only this operation the trace recording (with an operation context variable)

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 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 - 1 minute
                  1m