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

[jcr2spi]RepositoryException lost in org.apache.jackrabbit.jcr2spi.ItemManagerImpl while querying on remote nodes exposed by jackrabbit-spi

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

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.3
    • 0.9, 2.7.1
    • jackrabbit-jcr2spi
    • None

    Description

      RepositoryException lost in ItemManagerImpl#nodeExists, ItemManagerImpl#itemExists(HierarchyEntry), ItemManagerImpl#propertyExists, ItemManagerImpl#itemExists(ItemState)

      /**

      • @see ItemManager#nodeExists(Path)
        */
        public boolean nodeExists(Path path)
        Unknown macro: { try { // session-sanity & permissions are checked upon itemExists(ItemState) NodeState nodeState = hierMgr.getNodeState(path); return itemExists(nodeState); } catch (PathNotFoundException pnfe) { return false; } catch (ItemNotFoundException infe) { return false; } catch (RepositoryException re) { return false; } }

      The catch block for RepositoryException should probably wrap the exception as a RuntimeException as it might happen for unknown reason.
      Changing this might break backward compatibility.

      The issue was detected when trying to implement a synchronization service with a content repository exposed by a jackrabbit-spi implementation. If the content repository becomes non-responsive while checking whether a node exists or not, the RepositoryException is lost in ItemManager#nodeExists resulting in deletion of the local node corresponding to the remote node.

      Attachments

        Activity

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

          People

            chetanm Chetan Mehrotra
            abhinavatul Abhinav Atul
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment