Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Package installation error

Avatar

Level 2

Hi All,

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.

 

 

 

6 Replies

Avatar

Community Advisor

Hi,

Can you please check this issue raised in GitHub:

https://github.com/adamcin/net.adamcin.recap/issues/7

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.

~ Prince

Thanks for your reply. But am facing this issue in AEM 6.1 and not sure if any hotfix is available for it.

Avatar

Level 8

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

Avatar

Level 10

Please provide more details about this package - was it built from past versions of AEM. THere are many variables that can account for this. 

Avatar

Level 2

If packaging users, try adding this filter:

exclude /home/users/.*/.tokens

Otherwise, the .token may be from some other content (consult error log)

Reference: https://helpx.adobe.com/experience-manager/kb/OakConstraint0027-error-when-migrating-users-and-group...

Avatar

Administrator

Try:

1. Try creating package with below exclude filters:

/home/users/a/admin

/home/users/a/anonymous

/home/users/.*/.tokens

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].



Kautuk Sahni