You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Michael Dürig (JIRA)" <ji...@apache.org> on 2009/10/04 22:17:56 UTC

[jira] Resolved: (JCR-2293) PathNotFoundException but item exists

     [ https://issues.apache.org/jira/browse/JCR-2293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dürig resolved JCR-2293.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0
         Assignee: Michael Dürig

Fixed in revision: 821598

> PathNotFoundException but item exists
> -------------------------------------
>
>                 Key: JCR-2293
>                 URL: https://issues.apache.org/jira/browse/JCR-2293
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr2spi
>    Affects Versions: 1.5.7, 2.0.0
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>             Fix For: 2.0.0
>
>
> The following test case (for jcr2spi) throws a PathNotFoundException for an item which exists. It does not throw if the marked line below is commented out. 
> public void testBug24687() throws RepositoryException {
>     String parentPath = testNode.getPath();
>     String folderName = "folder_" + System.currentTimeMillis();
>     Session session = getHelper().getReadWriteSession();
>     Session session2 = getHelper().getReadOnlySession();
>     session2.getItem(parentPath);  // removing this line makes the failure go away
>     Node parent = (Node) session.getItem(parentPath);
>     Node toDelete = parent.addNode(folderName, "nt:folder");
>     parent.save();
>     try {
>         Item item2 = session2.getItem(parentPath + "/" + folderName);  // wrongly throws PathNotFoundException
>         assertEquals(parentPath + "/" + folderName, item2.getPath());
>     }
>     finally {
>         toDelete.remove();
>         parent.save();
>         assertFalse(parent.hasNode(folderName));
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.