Problems with jcr:uuid property while creating an AEM User programmatically
Hi Team,
I'm creating an AEM user programmatically (i.e.) I'm creating the folder structure which looks exactly same as the package structure when we create a list of users (located under "/home/users") package using http://localhost:4502/crx/packmgr/index.jsp by selecting "/home/users" as filters. I tried to remove "jcr:uuid" property as it will be automatically created by AEM and tried to install the package but the package was not installed and got the below exception.
Could not Install Package
"org.apache.jackrabbit.vault.packaging.PackageException: javax.jcr.nodetype.ConstraintViolationException: OakConstraint0021: Invalid jcr:uuid for authorizable username@domain.com"
Caused by: org.apache.jackrabbit.vault.packaging.PackageException: javax.jcr.nodetype.ConstraintViolationException: OakConstraint0021: Invalid jcr:uuid for authorizable username@domain.com
Caused by: javax.jcr.nodetype.ConstraintViolationException: OakConstraint0021: Invalid jcr:uuid for authorizable
username@domain.com
So, I have generated a random uuid using java.util.UUID.randomUUID().toString() and set it to the jcr:uuid property. When I tried to install the package, I got the below exception -
Error: org.apache.jackrabbit.vault.packaging.PackageException: javax.jcr.nodetype.ConstraintViolationException: OakConstraint0021:
Invalid jcr:uuid for authorizable username@domain.com
Please help in this. May I know how exactly AEM is generating jcr:uuid value to a particular user? So that I can try the same approach, hope the above issue will be resolved.
Thanks,
Dinakar.