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

Fix NPE when retrieving a file from Cold Storage where its class is Standard

    XMLWordPrintable

    Details

    • Release Notes Summary:
      Retrieval of a document of the which the blob is restored leads to a the document being restored
    • Backlog priority:
      800
    • Sprint:
      nxplatform #88
    • Story Points:
      2

      Description

      I cannot describe the condition which leads to this bug but here is what I observe :

      • in the document metadata, the document is seen under Cold Storage : the document has the "ColdStorage" facet and the "coldstorage:coldContent" property is set
      • in S3, the related object has the "Standard" storage class

      When trying to retrieve the file from Cold Storage, it causes a NPE with this stacktrace

      ****** chain ******
      Name: Document.RequestRetrievalFromColdStorage
      Exception: OperationException
      Caught error: Failed to invoke operation Document.RequestRetrievalFromColdStorage
      Caused by: org.nuxeo.ecm.automation.OperationException: Failed to invoke operation Document.RequestRetrievalFromColdStorage
      ****** Hierarchy calls ******
      	org.nuxeo.coldstorage.operations.RequestRetrievalFromColdStorage
      ...
      Caused by: java.lang.NullPointerException
      	at java.util.Date.from(Date.java:1357) ~[?:1.8.0_362]
      	at org.nuxeo.coldstorage.service.ColdStorageServiceImpl.retrieveFromColdStorage(ColdStorageServiceImpl.java:324) ~[nuxeo-coldstorage-10.0.0.jar:?]
      	at org.nuxeo.coldstorage.operations.RequestRetrievalFromColdStorage.run(RequestRetrievalFromColdStorage.java:64) ~[nuxeo-coldstorage-10.0.0.jar:?]
      	at sun.reflect.GeneratedMethodAccessor746.invoke(Unknown Source) ~[?:?]
      

      Expected behavior: the file is retrieved from Cold Storage.

      Given the fact that the current storage class is Standard, maybe the Nuxeo properties related to cold storage should be reset and the file should appear as Restored from cold storage

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: