Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-288

inconsistent session state after Item/Session.save() throwing ReferentialIntegrityException

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0
    • jackrabbit-core
    • None
    • svn r354756

    Description

      issue reported by Tomasz.Dabrowski@cognifide.com on jackrabbit dev list.

      code fragment to reproduce issue:

      // setup test case

      Node parent = root.addNode("a", "nt:unstructured");
      Node child1 = parent.addNode("b", "nt:unstructured");
      child1.addMixin("mix:referenceable");
      Node child2 = parent.addNode("c", "nt:unstructured");
      child2.setProperty("ref", child1);
      root.save();

      // perform test

      try {
      child1.remove();
      parent.save();
      } catch (ReferentialIntegrityException rie) {
      // expected since child1 is still being referenced by property "ref" of child2
      }

      parent.remove(); // ==> should succeed but throws ItemNotFoundException

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            stefan@jira Stefan Guggisberg
            stefan@jira Stefan Guggisberg
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment