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

Timothee Maret commented on SLING-11560:
----------------------------------------

Makes sense to reuse the existing configuration.

> Vault error when importing a node with the same name and UUID as a 
> pre-existing non-sibling node
> ------------------------------------------------------------------------------------------------
>
>                 Key: SLING-11560
>                 URL: https://issues.apache.org/jira/browse/SLING-11560
>             Project: Sling
>          Issue Type: Bug
>          Components: Content Distribution
>            Reporter: Manas Kumar Maji
>            Assignee: Timothee Maret
>            Priority: Major
>             Fix For: Content Distribution Core 0.4.6
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> The latest version of _org.apache.jackrabbit.vault_ 
> (_3.6.1.T20220805092633-0b8a2641_) is throwing an exception when trying to 
> install a content package (via SCD), which has a node with the same name and 
> UUID as an existing non-sibling node.
> {noformat}
> Caused by: javax.jcr.ReferentialIntegrityException: Node identifier 
> Optional[df89c4d9-6d47-480a-af2d-1bffa49bc5d1] already taken by node 
> /content/dam/test/SYEW0105.JPG
>     at 
> org.apache.jackrabbit.vault.fs.impl.io.DocViewImporter.addNode(DocViewImporter.java:862)
>  [org.apache.jackrabbit.vault:3.6.1.T20220805092633-0b8a2641]
>     at 
> org.apache.jackrabbit.vault.fs.impl.io.DocViewImporter.startDocViewNode(DocViewImporter.java:405)
>  [org.apache.jackrabbit.vault:3.6.1.T20220805092633-0b8a2641]
>     at 
> org.apache.jackrabbit.vault.fs.impl.io.DocViewSAXHandler.startElement(DocViewSAXHandler.java:348)
>  [org.apache.jackrabbit.vault:3.6.1.T20220805092633-0b8a2641]
> {noformat}
> *Older Behaviour:* In the older version of jackrabbit vault (3.4.6), an new 
> UUID would be created for the new node:
> {noformat}
> 17.08.2022 17:37:00.739 *WARN* [qtp1778855870-1811] 
> org.apache.jackrabbit.vault.fs.impl.io.DocViewSAXImporter Packaged node at 
> /content/dam/hunting/SYEW0105.JPG is referenceable and collides with existing 
> node at /content/dam/test/SYEW0105.JPG. Will create new UUID.
> {noformat}
> *Current Behaviour:* From the AEM author logs, it seems that the OSGi config 
> having the _IdConflictPolicy.LEGACY_ is not being respected by SCD:
> {noformat}
> 24.08.2022 15:10:45.799 *WARN* [qtp1859723769-86] 
> org.apache.jackrabbit.vault.fs.impl.io.DocViewImporter Node Collision: To-be 
> imported node /content/dam/hunting/SYEW0105.JPG uses a node identifier 
> Optional[df89c4d9-6d47-480a-af2d-1bffa49bc5d1] which is already taken by 
> /content/dam/test/SYEW0105.JPG, trying to resolve conflict according to 
> policy FAIL
> {noformat}
> *Expected Behaviour:* SCD should take the _IdConflictPolicy_ into 
> consideration when installing the content packages. So if 
> _IdConflictPolicy.LEGACY_ is set, then a new UUID should be generated for the 
> new node.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to