[ 
https://issues.apache.org/jira/browse/SLING-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798703#action_12798703
 ] 

Ian Boston commented on SLING-1281:
-----------------------------------

I dont know if we can fix it differently.

To fix the problem an item that is removed and then added will be present in 
the SessionItemStateManager.atticStore as its been removed, but it also needs 
to be present in the SessionItemStateManager.transientStore as that is where 
its expected to be.

I suspect this is really a bug in Jackrabbit since the create operation should 
have put it in the session transientStore (?), but I am not certain about that, 
so the save is really a workarround.

Is there another way of getting items into the 
SessionItemStateManager.transientStore ? Or should the Jackrabbit code really 
be looking in the atticStore.

An alternative way might be to return the /d2 node from the copy operation 
avoiding the session.getItem operation altogether ? I can work up a patch for 
that.

> Copy Move operations dont work.
> -------------------------------
>
>                 Key: SLING-1281
>                 URL: https://issues.apache.org/jira/browse/SLING-1281
>             Project: Sling
>          Issue Type: Bug
>    Affects Versions: Servlets Post 2.0.6, JCR Jackrabbit Server 2.0.6
>            Reporter: Ian Boston
>            Assignee: Ian Boston
>             Fix For: Servlets Post 2.0.6
>
>         Attachments: test-SLING-1281.sh
>
>
> To reproduce: 
> Create 2 content items: 
> * curl -X POST http://localhost:8080/d1 -u admin:admin 
> * curl -X POST http://localhost:8080/d2 -u admin:admin 
> Attempt to copy one item on top of the other: 
> * curl -F ":operation=copy" -F ":dest=d2" http://localhost:8080/d1 -u 
> admin:admin 
> Correctly encounter: 412 "Cannot copy JcrNodeResource, type=nt:unstructured, 
> path=/d1 to /d2: destination exists" 
> Attempt to copy one item on top of the other with :replace set to true: 
> * curl -F ":operation=copy" -F ":dest=d2" -F ":replace=true" 
> http://localhost:8080/d1 -u admin:admin 
> This should now succeed, however, it is returning: 
> 500 javax.jcr.PathNotFoundException: /d2 
> and we know for sure /d2 exists! 
> I think this might be related to changes in the pooling.

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

Reply via email to