You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Julian Reschke (JIRA)" <ji...@apache.org> on 2018/11/08 11:03:00 UTC

[jira] [Commented] (JCR-4387) Wrong error message when same-name-sibling is prevented on import

    [ https://issues.apache.org/jira/browse/JCR-4387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16679603#comment-16679603 ] 

Julian Reschke commented on JCR-4387:
-------------------------------------

Patch: https://issues.apache.org/jira/secure/attachment/12947398/JCR-4387.diff

This looks right to me, but I'm not an expert in this area. Feedback appreciated. ([~mreutegg], [~mduerig]?) Also, do we have a similar issue in Oak maybe?

> Wrong error message when same-name-sibling is prevented on import
> -----------------------------------------------------------------
>
>                 Key: JCR-4387
>                 URL: https://issues.apache.org/jira/browse/JCR-4387
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.16.2
>            Reporter: Jörg von Frantzius
>            Assignee: Julian Reschke
>            Priority: Major
>         Attachments: DocumentViewTest.java, JCR-4387.diff, SessionImporter.java
>
>
> When importing XML for a node with the same name as an existing node, but with different UUID, an ItemExistsException is thrown, effectively preventing the creation of a same-name sibling on import.
> Assuming that same-name siblings are supposed to be prevented on import, that's totally perfect, but the error message of the Exception thrown is wrong and very misleading: "Node with the same UUID exists", where it should be something like "Node with same *name* exists, must prevent same-name-sibling".
> [https://github.com/apache/jackrabbit/blob/b23d6734381e49f236c3705820126803555608b5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SessionImporter.java#L381]
> As a suggestion, perhaps the code should further check for javax.jcr.nodetype.NodeDefinition#allowsSameNameSiblings before throwing the exception?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)