--- In jcr-crx@yahoogroups.com, "paul_bowler" <paul_bowler@...> wrote:
>
> I'm duplicating nodes in our JCR using workspace.copy(workspace, srcPath,
destPath) and am experiencing strange behaviour.
>
> This succeeds as expected:
>
> srcPath = /templates/pcf:PCF/pcf:Service/pcf:Scene
> destPath = /templates/pcf:PCF/pcf:Service/pcf:Scene
>
> This succeeds (no exception is thrown), but puts the copy in the wrong place:
>
> srcPath = /templates/pcf:PCF[2]/pcf:Service/pcf:Scene
> destPath = /templates/pcf:PCF[2]/pcf:Service/pcf:Scene
>
> The copy is actually placed at /templates and renamed to pcf:PCF[3]
This could be a bug in Jackrabbit. Please consult the Jackrabbit users or dev
mailing list (http://jackrabbit.apache.org/mailing-lists.html) and maybe report
an issue (http://jackrabbit.apache.org/issue-tracker.html).
Same-name siblings create a lot of problems, not only on the implementation
side, but also when using them in applications, since the paths are not stable
so it's always good to avoid them altogether.
Regards,
Alex