[jira] Created: (SLING-1281) Copy Move operations dont work.

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (SLING-1281) Copy Move operations dont work.

Oliver Lietz (Jira)
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


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 | Threaded
Open this post in threaded view
|

[jira] Updated: (SLING-1281) Copy Move operations dont work.

Oliver Lietz (Jira)

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

Ian Boston updated SLING-1281:
------------------------------

    Attachment: test-SLING-1281.sh

Script to reproduce the problem

> 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
>         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 | Threaded
Open this post in threaded view
|

[jira] Assigned: (SLING-1281) Copy Move operations dont work.

Oliver Lietz (Jira)
In reply to this post by Oliver Lietz (Jira)

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

Ian Boston reassigned SLING-1281:
---------------------------------

    Assignee: Ian Boston

> 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
>         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 | Threaded
Open this post in threaded view
|

[jira] Commented: (SLING-1281) Copy Move operations dont work.

Oliver Lietz (Jira)
In reply to this post by Oliver Lietz (Jira)

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

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

Checking the sequence of operations.

session.getItem("/d2-xxxx") goes into ItemImpl that retrieves a ItemId fromt he path from the Hierarchy manager, that itemsId is not found.

Looking that the resolution of ItemId to item, eventually the SessionItemStateManager looks for the ItemData from cache. Line 181 checks to see if the item has been removed, (d2 was removed earlier in the copy operation), and finds atticStore does indeed contain the item. However getTransientItemState(id) only looks in the transientStore which from the doc is only used for new and modified items, not removed items.

Looking at hasItemState(id) for a the SessionItemStateManager to return an item, if in the atticStore it must also be in the transientStore (since it was deleted and then created new again), otherwise it does not exist.

Two observations here.
The /d2 node was removed, so it should be in the atticStore, but it should have been created by a new copy and so be in the transientStore.

Need to check what happens if we copy to a node that doesnt exist, so doesnt need to be removed, and if the node really is created by the copy operation.



> 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
>         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 | Threaded
Open this post in threaded view
|

[jira] Commented: (SLING-1281) Copy Move operations dont work.

Oliver Lietz (Jira)
In reply to this post by Oliver Lietz (Jira)

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

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

If the destination node does not already exist, then the copy works perfectly. Indicating the problem is with the remove and add of the destination node.


> 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
>         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 | Threaded
Open this post in threaded view
|

[jira] Updated: (SLING-1281) Copy Move operations dont work.

Oliver Lietz (Jira)
In reply to this post by Oliver Lietz (Jira)

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

Ian Boston updated SLING-1281:
------------------------------

    Attachment: test-SLING-1281.sh

Updated with the corrected response code.

> 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
>         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 | Threaded
Open this post in threaded view
|

[jira] Updated: (SLING-1281) Copy Move operations dont work.

Oliver Lietz (Jira)
In reply to this post by Oliver Lietz (Jira)

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

Ian Boston updated SLING-1281:
------------------------------

    Attachment:     (was: test-SLING-1281.sh)

> 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
>         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 | Threaded
Open this post in threaded view
|

[jira] Commented: (SLING-1281) Copy Move operations dont work.

Oliver Lietz (Jira)
In reply to this post by Oliver Lietz (Jira)

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

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

Looks like the state of the parent node on /d2 is not saved, and hence isnt in the transientStore. adding a save puts it there and fixes this bug.

> 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
>         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 | Threaded
Open this post in threaded view
|

[jira] Resolved: (SLING-1281) Copy Move operations dont work.

Oliver Lietz (Jira)
In reply to this post by Oliver Lietz (Jira)

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

Ian Boston resolved SLING-1281.
-------------------------------

       Resolution: Fixed
    Fix Version/s: Servlets Post 2.0.6

Fixed

> 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (SLING-1281) Copy Move operations dont work.

Oliver Lietz (Jira)
In reply to this post by Oliver Lietz (Jira)

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

Felix Meschberger commented on SLING-1281:
------------------------------------------

Can we fix this differently ?

I don't like the save call during the operation, because this may not work (and thus throw other exceptions) or in the case of other errors during processing leave partial changes behind.

Maybe we need different internal state for removed items which we can then check while processing further modifications ?

> 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (SLING-1281) Copy Move operations dont work.

Oliver Lietz (Jira)
In reply to this post by Oliver Lietz (Jira)

    [ 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (SLING-1281) Copy Move operations dont work.

Oliver Lietz (Jira)
In reply to this post by Oliver Lietz (Jira)

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

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

Committed patch that uses the newly created item and avoids the save operation.

> 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (SLING-1281) Copy Move operations dont work.

Oliver Lietz (Jira)
In reply to this post by Oliver Lietz (Jira)

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

Felix Meschberger commented on SLING-1281:
------------------------------------------

Great. Thanks for fixing.

Re Attic etc: I agree, that this is probably a Jackrabbit bug.

This should be reproducible by something like:

   Node node = parent.addNode("test");
   session.save();

   parent.getNode("test").remove();
   parent.addNode("test");
   
   // should throw
   parent.getNode("test");

correct ?

> 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (SLING-1281) Copy Move operations dont work.

Oliver Lietz (Jira)
In reply to this post by Oliver Lietz (Jira)

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

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

Yes, that appears to be the pattern.

There might be more activity between the addNode and the getNode but I think its only setting properties, although that might invoke some extra permissions checks.

When this happend in Sakai I noticed that changing the LoginModule from PluggableDefaultLoginModule to DefaultLoginModule in both Sling and Sakai caused the same problem, which is bizarre since that appears to be completely unrelated.

> 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.