Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2108

Session.save() fails with NPE after reordering unsaved nodes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Blocker Blocker
    • 3.7.0.Final
    • 3.6.0.Final
    • JCR
    • None

      When a node.orderBefore("node1", "node2") operation is executed on a freshly created nodes (i.e. all node, node1 and node2 are not yet saved), then subsequent session.save() fails due to NPE at at org.modeshape.jcr.cache.PathCache.getPath(PathCache.java:46).

      ERROR info.magnolia.cms.core.DefaultHierarchyManager : java.lang.NullPointerException
         at org.modeshape.jcr.cache.PathCache.getPath(PathCache.java:46)
         at org.modeshape.jcr.cache.document.WritableSessionCache.persistChanges(WritableSessionCache.java:1127)
         at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:620)
         at org.modeshape.jcr.JcrSession.save(JcrSession.java:1141)
         ... 17 more
      

      See also the original issue in Magnolia's JIRA.

              hchiorean Horia Chiorean (Inactive)
              jchocholacek Jozef Chocholáček (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: