0 Replies Latest reply on Oct 20, 2017 8:06 AM by predatorro666

    Cannot checkout node


      Hi everyone,

      After migration from Modeshape 4 to 5, we found the next strange behavior in versioning:

      Saying we have the next structure:


      [kn:node] > kn:base, mix:etag, mix:lockable, mix:referenceable, nt:unstructured
      [kn:versionableNode] > kn:node, mix:versionable
      [kn:folder] > kn:base, mix:etag, mix:lockable, mix:referenceable, nt:unstructured, mix:versionable
      [kn:category] > kn:versionableNode
       - kn:id (STRING)
       + kn:caAttributes (kn:caAttributes)
      [kn:categoriesFolder] > kn:folder
       + kn:categoryItem (kn:category) SNS
      [kn:kbase] > kn:versionableNode
       - kn:id (STRING)
       + kn:categories (kn:categoriesFolder)


      Saying we have the next node with path



      After accessing/writing to the root node (kn:kbase) it is impossible to change child node (kn:category) because of exception:

      '/03ebay_101/kn:categories/31b11ea9-5f40-48a4-a582-dd04285b0fe1_en' (or its nearest versionable ancestor) is checked in, preventing this action


      Trying to checkout this node has no effect




      give us 'false'


      All the root nodes, which I suppose, must be the only ancestors for the current node, are checkedOut. We can see it when request parents one by one:

      session.getWorkspace().getVersionManager().isCheckedOut(itemNode.getParent().getParent().getParent().getPath())              //root node - '/'

      session.getWorkspace().getVersionManager().isCheckedOut(itemNode.getParent().getParent().getPath())                                 //kn:kbase node - '/03ebay_101/'

      session.getWorkspace().getVersionManager().isCheckedOut(itemNode.getParent().getPath())                                                    ///kn:categoriesFolder' - '03ebay_101/kn:categories/'


      All operations are made under one session which is connected to the web-request. Turning off transactions have no effect.


      After some tracing I see that check out is happened here


      versionable.setProperty(versionSession, props.create(JcrLexicon.IS_CHECKED_OUT, Boolean.TRUE));


      IsCheckedOut method is here

      And here we have different session cache where related node has property IsCheckedOut = false