jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konrad Windszus (Jira)" <j...@apache.org>
Subject [jira] [Issue Comment Deleted] (OAK-9541) ItemExistsException: "Node with the same UUID exists" thrown during SysView import with existing different UUID
Date Thu, 19 Aug 2021 16:25:00 GMT

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

Konrad Windszus updated OAK-9541:
---------------------------------
    Comment: was deleted

(was: The condition at https://github.com/apache/jackrabbit-oak/blob/d01cb5c9dbc6ae6fdb4df58fd81ac5ed8b0536d3/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/xml/ImporterImpl.java#L423
IMHO negates the wrong expression.

Instead of 
{code}
if (!(existingIdentifier.equals(id)
                            && (uuidBehavior == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING
                            || uuidBehavior == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING)))
{code}
probably 
{code}
if (existingIdentifier.equals(id)
                            && !(uuidBehavior == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING
                            || uuidBehavior == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING)))
{code}
is meant. )

> ItemExistsException: "Node with the same UUID exists" thrown during SysView import with
existing different UUID
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: OAK-9541
>                 URL: https://issues.apache.org/jira/browse/OAK-9541
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: jcr
>    Affects Versions: 1.40.0
>            Reporter: Konrad Windszus
>            Priority: Major
>
> When trying to import a node via SysViewImportHandler which already exists at the same
path with a different (but non-referenced UUID) in the repo the following exception can be
observed:
> {code}
>  javax.jcr.ItemExistsException: Node with the same UUID exists:/tmp/referenceable/child:
{ jcr:primaryType = nt:unstructured}
> 	at org.apache.jackrabbit.oak.jcr.xml.ImporterImpl.startNode(ImporterImpl.java:426) ~[oak-jcr-1.40.0.jar:1.40.0]
> 	at org.apache.jackrabbit.oak.jcr.xml.SysViewImportHandler.processNode(SysViewImportHandler.java:81)
~[oak-jcr-1.40.0.jar:1.40.0]
> 	at org.apache.jackrabbit.oak.jcr.xml.SysViewImportHandler.endElement(SysViewImportHandler.java:221)
~[oak-jcr-1.40.0.jar:1.40.0]
> 	at org.apache.jackrabbit.oak.jcr.xml.ImportHandler.endElement(ImportHandler.java:197)
~[oak-jcr-1.40.0.jar:1.40.0]
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message