Expand my Community achievements bar.

SOLVED

Getting error when Migration user from 6.0 to 6.2

Avatar

Level 4

Dear All,

We are migrating our AEM 6.0 to 6.2 environment.

I created the user package with below information in my 6.0 environment.

Package Name:     Users_Migrate_6.2_Sunita
Filters:     /home/users
exclude    /home/users/a/admin
exclude    /home/users/a/anonymous

After creating package when I tried to install the above package in 6.2 then I am getting below error. Also screenshot attached.

Error: org.apache.jackrabbit.vault.packaging.PackageException: javax.jcr.nodetype.ConstraintViolationException: OakConstraint0027: The admin user cannot be removed.

Please help me on this.

1 Accepted Solution

Avatar

Correct answer by
Level 2

Hi,

Even we faced this issue when migrating from 5.6.1 to 6.1. The problem here is that your package has all users (at folder level - alphabets, numbers, etc), so what happens is it will replace the existing the folder structure which will remove the existing users including admin and anonymous which are now created with random id.

We resolved this issue by creating user package with individual filters (each user and group path). You can make use of ACS AEM Commons tool - https://adobe-consulting-services.github.io/acs-aem-commons/features/authorizable-packager.html for the same.

Thanks.

View solution in original post

3 Replies

Avatar

Level 3

Hi there,

You'll want to double check your particular instance, but on every instance I've worked with past 6.0 the admin user shows up in a different place. So for your specific error, it looks like you excluded the admin user in the source instance, but it's trying to overwrite it on the destination instance. Find the admin user on the new instance, and add that path to the exclusions too - that might help. I would suggest excluding the 'system' user folder too, since 6.0 and 6.2 have lots of changes between the two. Basically exclude anything that might have been included by default on either the 6.0 or the 6.2 instance. 

I usually put all users in specific folders (not the default folders), for instance all LDAP user accounts are created in an LDAP folder, any local accounts for specific projects are in a project-specific folder. That makes user migration a bit more simple. 

A final note - I've had users with authentication issues unless you exclude the .tokens node under their user account. You can do a wildcard in the path to help with that. 

Hope this helps. Good luck

Andrew

Avatar

Level 9

Hi,

Exclude admin/anonymous filter of both source and target.

Thanks,

Avatar

Correct answer by
Level 2

Hi,

Even we faced this issue when migrating from 5.6.1 to 6.1. The problem here is that your package has all users (at folder level - alphabets, numbers, etc), so what happens is it will replace the existing the folder structure which will remove the existing users including admin and anonymous which are now created with random id.

We resolved this issue by creating user package with individual filters (each user and group path). You can make use of ACS AEM Commons tool - https://adobe-consulting-services.github.io/acs-aem-commons/features/authorizable-packager.html for the same.

Thanks.