[ https://issues.apache.org/jira/browse/JCRVLT-753?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Danilo Banjac updated JCRVLT-753: --------------------------------- Description: {*}Issue Description{*}: Recent updates to the replication conflict resolution strategy in Adobe Experience Manager (AEM) using JCR Filevault have led to failures when attempting to replicate content packages. Specifically, the shift from the *LEGACY* to the *FORCE_REMOVE_CONFLICTING_ID* strategy causes *javax.jcr.nodetype.ConstraintViolationException: OakConstraint0026* due to the attempted deletion of mandatory child nodes during the replication process. {*}Steps to Reproduce{*}: 1. Create a content package with a primary node of type *nt:file* and a mandatory child node {*}jcr:content{*}. 2. Update the version of the content package, ensuring the *jcr:uuid* of the *jcr:content* node remains unchanged. 3. Replicate the updated content package. {*}Observed Behavior{*}: - The replication framework attempts to remove the conflicting *jcr:content* node due to the identical {*}jcr:uuid{*}. - The deletion operation fails because the parent *nt:file* node requires the *jcr:content* child node, resulting in a {*}ConstraintViolationException{*}: "{*}Mandatory child node jcr:content cannot be removed.{*}" {*}Root Cause{*}: The *FORCE_REMOVE_CONFLICTING_ID* conflict resolution strategy does not account for the constraints of mandatory child nodes in the JCR repository, leading to violations when trying to remove these nodes. {*}Impact{*}: This issue prevents successful replication of updated content packages in AEM, disrupting content management workflows and generating errors in the log. *Nodes Used for Testing* {noformat} { "jcr:primaryType": "nt:file", "jcr:createdBy": "sling-distribution-importer", "jcr:created": "Tue May 14 2024 10:13:41 GMT+0000", "jcr:content": { "jcr:primaryType": "nt:resource", "jcr:mixinTypes": [ "vlt:Package" ], "jcr:lastModifiedBy": "admin", "jcr:mimeType": "application/zip", "jcr:lastModified": "Tue May 14 2024 10:13:32 GMT+0000", ":jcr:data": 35146, "jcr:uuid": "cef51ff7-f3fc-4a41-b765-ca4ceb4246ce", "vlt:definition": { "jcr:primaryType": "vlt:PackageDefinition", "testedWith": "", "lastUnpacked": "Tue May 14 2024 10:13:41 GMT+0000", "lastUnpackedBy": "sling-distribution-importer", "requiresRestart": false, "requiresRoot": false, "lastWrapped": "Fri Apr 26 2024 12:27:44 GMT+0000", "buildCount": "17", "providerLink": "", "providerName": "", "jcr:created": "Fri Apr 26 2024 12:27:44 GMT+0000", "name": "global-truststore", "group": "admin-tasks", "version": "15.0", "dependencies": [], "fixedBugs": "", "jcr:lastModified": "Fri Apr 26 2024 12:27:44 GMT+0000", "lastUnwrapped": "Tue May 14 2024 10:13:32 GMT+0000", "providerUrl": "", "screenshots": { "jcr:primaryType": "nt:unstructured" }, "filter": { "jcr:primaryType": "nt:unstructured", "f0": { "jcr:primaryType": "nt:unstructured", "propertyRules": [], "mode": "replace", "root": "/etc/truststore", "rules": [] } } } } }{noformat} was: AEM has a user synchronisation capability in the publish tier. The synchronisation mechanism relies on FileVault to export and import content. Users stored in the repository under a path that starts with a _ and that contain another _ can be exported but fail to be re-imported. For instance, the user stored under the path /home/users/test/_6k_test-user-a won't be imported. Debugging this issue, it seems that FileVault treats the _6k_ pattern as a namespace and thus skip the resource upon import because the paths don't match. > FORCE_REMOVE_CONFLICTING_ID Strategy Causing Constraint Violation Exception > in AEM Replication > ---------------------------------------------------------------------------------------------- > > Key: JCRVLT-753 > URL: https://issues.apache.org/jira/browse/JCRVLT-753 > Project: Jackrabbit FileVault > Issue Type: Bug > Components: vlt > Reporter: Danilo Banjac > Assignee: Konrad Windszus > Priority: Major > Labels: vault > > {*}Issue Description{*}: > Recent updates to the replication conflict resolution strategy in Adobe > Experience Manager (AEM) using JCR Filevault have led to failures when > attempting to replicate content packages. Specifically, the shift from the > *LEGACY* to the *FORCE_REMOVE_CONFLICTING_ID* strategy causes > *javax.jcr.nodetype.ConstraintViolationException: OakConstraint0026* due to > the attempted deletion of mandatory child nodes during the replication > process. > {*}Steps to Reproduce{*}: > 1. Create a content package with a primary node of type *nt:file* and a > mandatory child node {*}jcr:content{*}. > 2. Update the version of the content package, ensuring the *jcr:uuid* of the > *jcr:content* node remains unchanged. > 3. Replicate the updated content package. > {*}Observed Behavior{*}: > - The replication framework attempts to remove the conflicting *jcr:content* > node due to the identical {*}jcr:uuid{*}. > - The deletion operation fails because the parent *nt:file* node requires the > *jcr:content* child node, resulting in a {*}ConstraintViolationException{*}: > "{*}Mandatory child node jcr:content cannot be removed.{*}" > {*}Root Cause{*}: > The *FORCE_REMOVE_CONFLICTING_ID* conflict resolution strategy does not > account for the constraints of mandatory child nodes in the JCR repository, > leading to violations when trying to remove these nodes. > {*}Impact{*}: > This issue prevents successful replication of updated content packages in > AEM, disrupting content management workflows and generating errors in the log. > *Nodes Used for Testing* > {noformat} > { > "jcr:primaryType": "nt:file", > "jcr:createdBy": "sling-distribution-importer", > "jcr:created": "Tue May 14 2024 10:13:41 GMT+0000", > "jcr:content": { > "jcr:primaryType": "nt:resource", > "jcr:mixinTypes": [ > "vlt:Package" > ], > "jcr:lastModifiedBy": "admin", > "jcr:mimeType": "application/zip", > "jcr:lastModified": "Tue May 14 2024 10:13:32 GMT+0000", > ":jcr:data": 35146, > "jcr:uuid": "cef51ff7-f3fc-4a41-b765-ca4ceb4246ce", > "vlt:definition": { > "jcr:primaryType": "vlt:PackageDefinition", > "testedWith": "", > "lastUnpacked": "Tue May 14 2024 10:13:41 GMT+0000", > "lastUnpackedBy": "sling-distribution-importer", > "requiresRestart": false, > "requiresRoot": false, > "lastWrapped": "Fri Apr 26 2024 12:27:44 GMT+0000", > "buildCount": "17", > "providerLink": "", > "providerName": "", > "jcr:created": "Fri Apr 26 2024 12:27:44 GMT+0000", > "name": "global-truststore", > "group": "admin-tasks", > "version": "15.0", > "dependencies": [], > "fixedBugs": "", > "jcr:lastModified": "Fri Apr 26 2024 12:27:44 GMT+0000", > "lastUnwrapped": "Tue May 14 2024 10:13:32 GMT+0000", > "providerUrl": "", > "screenshots": { > "jcr:primaryType": "nt:unstructured" > }, > "filter": { > "jcr:primaryType": "nt:unstructured", > "f0": { > "jcr:primaryType": "nt:unstructured", > "propertyRules": [], > "mode": "replace", > "root": "/etc/truststore", > "rules": [] > } > } > } > } > }{noformat} > -- This message was sent by Atlassian Jira (v8.20.10#820010)