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

Fix NPE when moving a Snapshotable document

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2021.58, 2023.16
    • Fix Version/s: 2025.x, 2023.20, 2021.61
    • Component/s: Core
    • Release Notes Summary:
      Moving a document to an Orderable folderable is now working correctly.
    • Backlog priority:
      900
    • Team:
      PLATFORM
    • Sprint:
      nxplatform #122
    • Story Points:
      3

      Description

      Steps to reproduce:

      1. install Nuxeo 2021.58
      2. install the addons nuxeo-jsf-ui and nuxeo-tree-snapshot
      3. copy the jar nuxeo-tree-snapshot-jsf-2021.58.6.jar (it contains a modif to be able to create a versionable folder in an ordered folder)
      4. start Nuxeo and go to the personal workspace
      5. create 2 ordered folders
      6. in the first ordered folder, create a versionable folder
      7. in the first ordered folder, select the versionable folder and push the button to add it to the selection
      8. navigate to the second ordered folder
      9. in the left clipboard, click on the link to move the selection to the current folder
      10. observe the error

      In the logs, the stacktrace is

      Caused by: java.lang.NullPointerException
              at org.nuxeo.ecm.core.storage.sql.PersistenceContext.orderBefore(PersistenceContext.java:1397) ~[nuxeo-core-storage-sql-2021.58.6.jar:?]
              at org.nuxeo.ecm.core.storage.sql.SessionImpl.orderBefore(SessionImpl.java:846) ~[nuxeo-core-storage-sql-2021.58.6.jar:?]
              at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.orderBefore(SQLSession.java:191) ~[nuxeo-core-storage-sql-2021.58.6.jar:?]
              at org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentLive.orderBefore(SQLDocumentLive.java:733) ~[nuxeo-core-storage-sql-2021.58.6.jar:?]
              at org.nuxeo.ecm.core.api.AbstractSession.orderBefore(AbstractSession.java:2909) ~[nuxeo-core-2021.58.6.jar:?]
              at org.nuxeo.ecm.core.api.AbstractSession.move(AbstractSession.java:620) ~[nuxeo-core-2021.58.6.jar:?]
              at org.nuxeo.ecm.webapp.clipboard.ClipboardActionsBean.moveDocumentsToNewParent(ClipboardActionsBean.java:353) ~[nuxeo-platform-webapp-base-2021.39.6.jar:?]
              at org.nuxeo.ecm.webapp.clipboard.ClipboardActionsBean.moveDocumentList(ClipboardActionsBean.java:375) ~[nuxeo-platform-webapp-base-2021.39.6.jar:?]
              at org.nuxeo.ecm.webapp.clipboard.ClipboardActionsBean.moveDocumentList(ClipboardActionsBean.java:397) ~[nuxeo-platform-webapp-base-2021.39.6.jar:?]
              at org.nuxeo.ecm.webapp.clipboard.ClipboardActionsBean.moveWorkingList(ClipboardActionsBean.java:403) ~[nuxeo-platform-webapp-base-2021.39.6.jar:?]
      

      Expected behavior: the versionable folder is moved without error

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: