You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "c keller (JIRA)" <ji...@apache.org> on 2005/04/14 11:32:17 UTC

[jira] Created: (JCR-108) Node's childNodes out of sync after unsuccessful save()

Node's childNodes out of sync after unsuccessful save()
-------------------------------------------------------

         Key: JCR-108
         URL: http://issues.apache.org/jira/browse/JCR-108
     Project: Jackrabbit
        Type: Bug
    Reporter: c keller
    Priority: Minor


If node.save() failes due to an exception in PersistanceManager.store(ChangeLog) a successive call to node.getNodes() will still contain a reference to the node which failed to be persisted.
This is the case even after a call to refresh(false).
You have to restart Jackrabbit in order to get rid of this reference


UseCase in kind of dummy-code:

node.addNode("new", "nt:unstructured");
node.save();
=> ItemStateException from persistance

node.refresh(false);

Iterator itr = node.getNodes();
while(itr.hasNext()) {
   child = itr.nextNode();
}
=> Exception: "Failed to build path to "new"



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (JCR-108) Node's childNodes out of sync after unsuccessful save()

Posted by "Dominique Pfister (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-108?page=history ]

Dominique Pfister reassigned JCR-108:
-------------------------------------

    Assign To: Dominique Pfister

> Node's childNodes out of sync after unsuccessful save()
> -------------------------------------------------------
>
>          Key: JCR-108
>          URL: http://issues.apache.org/jira/browse/JCR-108
>      Project: Jackrabbit
>         Type: Bug
>     Reporter: c keller
>     Assignee: Dominique Pfister
>     Priority: Minor

>
> If node.save() failes due to an exception in PersistanceManager.store(ChangeLog) a successive call to node.getNodes() will still contain a reference to the node which failed to be persisted.
> This is the case even after a call to refresh(false).
> You have to restart Jackrabbit in order to get rid of this reference
> UseCase in kind of dummy-code:
> node.addNode("new", "nt:unstructured");
> node.save();
> => ItemStateException from persistance
> node.refresh(false);
> Iterator itr = node.getNodes();
> while(itr.hasNext()) {
>    child = itr.nextNode();
> }
> => Exception: "Failed to build path to "new"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Closed: (JCR-108) Node's childNodes out of sync after unsuccessful save()

Posted by "Dominique Pfister (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-108?page=history ]
     
Dominique Pfister closed JCR-108:
---------------------------------


> Node's childNodes out of sync after unsuccessful save()
> -------------------------------------------------------
>
>          Key: JCR-108
>          URL: http://issues.apache.org/jira/browse/JCR-108
>      Project: Jackrabbit
>         Type: Bug
>     Reporter: c keller
>     Assignee: Dominique Pfister
>     Priority: Minor

>
> If node.save() failes due to an exception in PersistanceManager.store(ChangeLog) a successive call to node.getNodes() will still contain a reference to the node which failed to be persisted.
> This is the case even after a call to refresh(false).
> You have to restart Jackrabbit in order to get rid of this reference
> UseCase in kind of dummy-code:
> node.addNode("new", "nt:unstructured");
> node.save();
> => ItemStateException from persistance
> node.refresh(false);
> Iterator itr = node.getNodes();
> while(itr.hasNext()) {
>    child = itr.nextNode();
> }
> => Exception: "Failed to build path to "new"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (JCR-108) Node's childNodes out of sync after unsuccessful save()

Posted by "Dominique Pfister (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-108?page=history ]
     
Dominique Pfister resolved JCR-108:
-----------------------------------

    Resolution: Fixed

Thank you for reporting this issue. 

This issue was caused by the shared item states that were not reloaded when a PersistenceManager#store operation failed. Fixed by reloading item states from persistent storage in revision 161276.

> Node's childNodes out of sync after unsuccessful save()
> -------------------------------------------------------
>
>          Key: JCR-108
>          URL: http://issues.apache.org/jira/browse/JCR-108
>      Project: Jackrabbit
>         Type: Bug
>     Reporter: c keller
>     Assignee: Dominique Pfister
>     Priority: Minor

>
> If node.save() failes due to an exception in PersistanceManager.store(ChangeLog) a successive call to node.getNodes() will still contain a reference to the node which failed to be persisted.
> This is the case even after a call to refresh(false).
> You have to restart Jackrabbit in order to get rid of this reference
> UseCase in kind of dummy-code:
> node.addNode("new", "nt:unstructured");
> node.save();
> => ItemStateException from persistance
> node.refresh(false);
> Iterator itr = node.getNodes();
> while(itr.hasNext()) {
>    child = itr.nextNode();
> }
> => Exception: "Failed to build path to "new"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira