Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 68578 invoked from network); 22 Nov 2007 01:49:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Nov 2007 01:49:05 -0000 Received: (qmail 86846 invoked by uid 500); 22 Nov 2007 01:48:52 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 86819 invoked by uid 500); 22 Nov 2007 01:48:52 -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 86802 invoked by uid 99); 22 Nov 2007 01:48:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Nov 2007 17:48:51 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Nov 2007 01:48:49 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0D08B714201 for ; Wed, 21 Nov 2007 17:48:43 -0800 (PST) Message-ID: <17090444.1195696123041.JavaMail.jira@brutus> Date: Wed, 21 Nov 2007 17:48:43 -0800 (PST) From: "Jukka Zitting (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Updated: (JCR-1131) JCR2SPI NodeEntryImpl throws NPE during reorderNodes In-Reply-To: <22895676.1189753834540.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-1131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jukka Zitting updated JCR-1131: ------------------------------- Fix Version/s: 1.4 > JCR2SPI NodeEntryImpl throws NPE during reorderNodes > ---------------------------------------------------- > > Key: JCR-1131 > URL: https://issues.apache.org/jira/browse/JCR-1131 > Project: Jackrabbit > Issue Type: Bug > Components: SPI > Reporter: David Rauschenbach > Fix For: 1.4 > > > Two folder nodes are created below root. From the root node, the 2nd folder is ordered before the first node. The request is batched up correctly, but upon save, NodeEntryImpl throws a NullPointerException in the first line of the completeTransientChanges method, because revertInfo.oldParent is null. > Test code: > final String FOLDER1 = "folder1", FOLDER2 = "folder2"; > > // Create folder 1 on server in root > Session serverSession = login(repository, creds); > Node serverRootNode = serverSession.getRootNode(); > Node serverFolder1 = serverRootNode.addNode(FOLDER1, "nt:folder"); > > // Create folder 2 on server in root > Node serverFolder2 = serverRootNode.addNode(FOLDER2, "nt:folder"); > serverSession.save(); > > // Validate order (TODO) > > // Perform reorder via client > Session clientSession = login(clientRepository, creds); > Node clientRootNode = clientSession.getRootNode(); > clientRootNode.orderBefore(FOLDER2, FOLDER1); > clientSession.save(); <== Throws NPE > Call Stack: > [junit] java.lang.NullPointerException > [junit] at org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntryImpl.completeTransientChanges(NodeEntryImpl.java:1354) > [junit] at org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntryImpl.access$1100(NodeEntryImpl.java:60) > [junit] at org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntryImpl$RevertInfo.statusChanged(NodeEntryImpl.java:1465) > [junit] at org.apache.jackrabbit.jcr2spi.state.ItemState.setStatus(ItemState.java:257) > [junit] at org.apache.jackrabbit.jcr2spi.state.NodeState.adjustNodeState(NodeState.java:554) > [junit] at org.apache.jackrabbit.jcr2spi.state.NodeState.persisted(NodeState.java:276) > [junit] at org.apache.jackrabbit.jcr2spi.state.ChangeLog.persisted(ChangeLog.java:135) > [junit] at org.apache.jackrabbit.jcr2spi.WorkspaceManager.execute(WorkspaceManager.java:479) > [junit] at org.apache.jackrabbit.jcr2spi.state.SessionItemStateManager.save(SessionItemStateManager.java:149) > [junit] at org.apache.jackrabbit.jcr2spi.ItemImpl.save(ItemImpl.java:239) > [junit] at org.apache.jackrabbit.jcr2spi.SessionImpl.save(SessionImpl.java:317) > [junit] at TestWsNodeReorder.testReorderNodes(TestWsNodeReorder.java:72) > I'm using an SPI I implemented, in conjunction with the jcr2spi and spi2jcr bridges, coupled with a back-end Jackrabbit in-memory filesystem. So there's always the possibility that node or property SPI calls inject errors and cause this downstream problem. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.