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

ClassCastException when attempting to reoder SNS with transient changes

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 5.4.0.Final
    • Fix Version/s: 5.4.1.Final
    • Component/s: JCR
    • Labels:
      None

      Description

      When attempting to reorder one or more SNS children of a parent which also have transient changes in a given JCR session, the following exception is raised:

      Caused by: java.lang.ClassCastException: org.modeshape.jcr.cache.document.TransactionalWorkspaceCache cannot be cast to org.modeshape.jcr.cache.document.AbstractSessionCache
      	at org.modeshape.jcr.cache.document.SessionNode.session(SessionNode.java:298)
      	at org.modeshape.jcr.cache.document.SessionNode.getPath(SessionNode.java:480)
      	at org.modeshape.jcr.cache.PathCache.getPath(PathCache.java:41)
      	at org.modeshape.jcr.cache.document.WritableSessionCache.computePathChangesForSNS(WritableSessionCache.java:1476)
      	at org.modeshape.jcr.cache.document.WritableSessionCache.persistChanges(WritableSessionCache.java:1258)
      	at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:690)
      	at org.modeshape.jcr.JcrSession.save(JcrSession.java:1179)
      	... 28 more
      

      Note that this can happen in 2 cases:

      1. explicitly reordering transient SNS
      2. restoring a non existent version (from a JCR session point of view) using the JcrVersionManager

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                hchiorean Horia Chiorean
                Reporter:
                hchiorean Horia Chiorean
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: