Expand my Community achievements bar.

SOLVED

Exception in a SlingRepositoryInitializer - AEM upgrade 6.2 - 6.4

Avatar

Level 4

Hi All,

I have completed the migration from AEM 6.2 to 6.4 successfully but when I am starting my new AEM 6.4 server I am getting below error :

16.05.2019 13:44:25.152 *ERROR* [Apache Sling Repository Startup Thread] com.adobe.granite.repository.impl.SlingRepositoryManager Exception in a SlingRepositoryInitializer, SlingRepository service registration aborted

java.lang.RuntimeException: Session.save failed: javax.jcr.security.AccessControlException: OakAccessControl0013: Duplicate ACE '/content/rep:policy/allow50' found in policy

Caused by: org.apache.jackrabbit.oak.api.CommitFailedException: OakAccessControl0013: Duplicate ACE '/content/rep:policy/allow50' found in policy

Any possible cause and solution?

1 Accepted Solution

Avatar

Correct answer by
Level 4

On the 6.2 instance, goto /content/rep:policy/allow50 and get the value of rep:principalName and run the below query(depending on allow or deny) to check if there are any duplicate ACLs under /content/rep:policy. Delete ACL and proceed with the upgrade.

If you are not able to delete the rep:policy node directly, remove mixins rep:rep:AccessControllable, delete the duplicate ACL and re add mixins after deletion

[1] select * from [rep:GrantACE] where [rep:principalName]='principalName'

[2] select * from [rep:DenyACE] where [rep:principalName]='principalName'

Another thought, on 6.4 you could try oak run tool [3] matching your AEM's oak version to delete the node /content/rep:policy/allow50 when AEM is not running by using the script [4] and start AEM. More details can be found on [5] - Step #3

Hope this helps!!

[3]

Maven Repository: org.apache.jackrabbit » oak-run

[4]

https://gist.githubusercontent.com/stillalex/43c49af065e3dd1fd5bf/raw/9e726a59f75b46e7b474f7ac763b08...

[5]

Offline Compaction fails with SegmentNotFoundException & IllegalArgumentException

View solution in original post

4 Replies

Avatar

Employee

Hello,

If you are able to login to web console, then try the below steps:

- Restart oak-core bundle (Stop and start from OSGI)

- Restart AEM instance.

Avatar

Level 4

No I am not able to login to web console as my server is not getting started.

Avatar

Employee Advisor

I would assume, that this issue can be reproduced when you start a fresh migration from the same instance. Can you check that?

In parallel you should raise a ticket with Adobe support, as this is a part of the migration process, and this should work ootb.

Avatar

Correct answer by
Level 4

On the 6.2 instance, goto /content/rep:policy/allow50 and get the value of rep:principalName and run the below query(depending on allow or deny) to check if there are any duplicate ACLs under /content/rep:policy. Delete ACL and proceed with the upgrade.

If you are not able to delete the rep:policy node directly, remove mixins rep:rep:AccessControllable, delete the duplicate ACL and re add mixins after deletion

[1] select * from [rep:GrantACE] where [rep:principalName]='principalName'

[2] select * from [rep:DenyACE] where [rep:principalName]='principalName'

Another thought, on 6.4 you could try oak run tool [3] matching your AEM's oak version to delete the node /content/rep:policy/allow50 when AEM is not running by using the script [4] and start AEM. More details can be found on [5] - Step #3

Hope this helps!!

[3]

Maven Repository: org.apache.jackrabbit » oak-run

[4]

https://gist.githubusercontent.com/stillalex/43c49af065e3dd1fd5bf/raw/9e726a59f75b46e7b474f7ac763b08...

[5]

Offline Compaction fails with SegmentNotFoundException & IllegalArgumentException