jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Garcia (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JCR-581) Workspace.clone() fails when source path and dest path have different depth
Date Tue, 03 Oct 2006 09:56:20 GMT
     [ http://issues.apache.org/jira/browse/JCR-581?page=all ]

David Garcia updated JCR-581:
-----------------------------

    Attachment: TestClone.java

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

       

Mime
View raw message