Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 416BF1038A for ; Fri, 13 Dec 2013 13:13:16 +0000 (UTC) Received: (qmail 56337 invoked by uid 500); 13 Dec 2013 13:13:14 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 55980 invoked by uid 500); 13 Dec 2013 13:13:13 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 55703 invoked by uid 99); 13 Dec 2013 13:13:08 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Dec 2013 13:13:08 +0000 Date: Fri, 13 Dec 2013 13:13:08 +0000 (UTC) From: "Chetan Mehrotra (JIRA)" To: dev@jackrabbit.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (JCR-3629) [jcr2spi]RepositoryException lost in org.apache.jackrabbit.jcr2spi.ItemManagerImpl while querying on remote nodes exposed by jackrabbit-spi MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JCR-3629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13847461#comment-13847461 ] Chetan Mehrotra commented on JCR-3629: -------------------------------------- Fixed in 2.1.7 with revision 1550719. > [jcr2spi]RepositoryException lost in org.apache.jackrabbit.jcr2spi.ItemManagerImpl while querying on remote nodes exposed by jackrabbit-spi > ------------------------------------------------------------------------------------------------------------------------------------------- > > Key: JCR-3629 > URL: https://issues.apache.org/jira/browse/JCR-3629 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: jackrabbit-jcr2spi > Affects Versions: 2.5.3 > Reporter: Abhinav Atul > Assignee: Chetan Mehrotra > Fix For: 2.1.7, 2.7.1 > > Attachments: JCR-3629.patch > > > RepositoryException lost in ItemManagerImpl#nodeExists, ItemManagerImpl#itemExists(HierarchyEntry), ItemManagerImpl#propertyExists, ItemManagerImpl#itemExists(ItemState) > /** > * @see ItemManager#nodeExists(Path) > */ > public boolean nodeExists(Path path) { > 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. -- This message was sent by Atlassian JIRA (v6.1.4#6159)