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

ClassCastException when attempting to reoder SNS with transient changes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 5.4.1.Final
    • 5.4.0.Final
    • JCR
    • 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

      Attachments

        Activity

          People

            hchiorean Horia Chiorean (Inactive)
            hchiorean Horia Chiorean (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: