[ https://issues.apache.org/jira/browse/JCRVLT-753?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julian Reschke reassigned JCRVLT-753: ------------------------------------- Assignee: Julian Reschke > 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: Improvement > Components: Misc, vlt > Reporter: Danilo Banjac > Assignee: Julian Reschke > Priority: Minor > > {*}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)