We are facing the below issue on installing our code package in AEM 6.1
"javax.jcr.nodetype.ConstraintViolationException: OakConstraint0021: Mandatory property jcr:data not found in a new node ".
If any one has come across this issue. Please suggest how to fix it.
Can you please check this issue raised in GitHub:
The issue appears to be in Oak. https://issues.apache.org/jira/browse/OAK-2052 describes the issue. Adobe released CQ-6.0.0-HOTFIX-5659 in December which has resolved the issue in my local testing. If you cannot install the hotfix, a workaround for AEM 5.6 to 6.0 migrations is to install Recap in the AEM 5.6 environment and perform the same transfer with the Reverse option checked, to push the content to the AEM 6.0 environment.
check if this can help yours.
Please share logs. Try to remove the node from the package on which it is throwing error.
Now create a custom node and add a property jcr:data.
Also check your code , there must be a custom xtype which requires the jcr:data type property. Remove the constraint on this property
If packaging users, try adding this filter:
Otherwise, the .token may be from some other content (consult error log)
1. Try creating package with below exclude filters:
2. Look at this answer:-Filevault OakConstraint0021 exception when copy content
3. Also, Try removing the error causing node and install the package [Do make sure that you backup what you delete].