You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Stefan Guggisberg (JIRA)" <ji...@apache.org> on 2006/10/03 15:41:21 UTC

[jira] Assigned: (JCR-581) Workspace.clone() fails when source path and dest path have different depth

     [ http://issues.apache.org/jira/browse/JCR-581?page=all ]

Stefan Guggisberg reassigned JCR-581:
-------------------------------------

    Assignee: Stefan Guggisberg

> Workspace.clone() fails when source path and dest path have different depth
> ---------------------------------------------------------------------------
>
>                 Key: JCR-581
>                 URL: http://issues.apache.org/jira/browse/JCR-581
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.1
>            Reporter: David Garcia
>         Assigned To: Stefan Guggisberg
>         Attachments: repository.xml, TestClone.java
>
>
> Hi,
> Cloning nodes between workspaces throws the following exception:
> javax.jcr.nodetype.ConstraintViolationException: no matching child node definition found for {}A resource
>         at org.apache.jackrabbit.core.nodetype.EffectiveNodeType.getApplicableChildNodeDef(EffectiveNodeType.java:737)
>         at org.apache.jackrabbit.core.nodetype.EffectiveNodeType.checkAddNodeConstraints(EffectiveNodeType.java:654)
>         at org.apache.jackrabbit.core.BatchedItemOperations.checkAddNode(BatchedItemOperations.java:583)
>         at org.apache.jackrabbit.core.BatchedItemOperations.copy(BatchedItemOperations.java:291)
>         at org.apache.jackrabbit.core.WorkspaceImpl.internalCopy(WorkspaceImpl.java:296)
>         at org.apache.jackrabbit.core.WorkspaceImpl.clone(WorkspaceImpl.java:403)
>         at TestWS.main(TestWS.java:54)
> when srcAbsPath and destAbsPath have different depths. Other cases might fail too; changing just the node´s name works, though.
> In the attached test, the node "/A resource" is cloned to two different paths:
> - "/Same resource" works ok.
> - "/folder/A resource" throws the exception shown above.
> Maybe I´m doing something wrong here, so please have a look at the attached source code.
> The test also registers a new namespace and a node type definition so that it works exactly the same way as the "real" code in our application.
> Thanks in advance.

-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira