Expand my Community achievements bar.

SOLVED

AEM 6.4: Modifying Users and Groups

Avatar

Level 3

Hello everyone,

I wanted to give permissions to few users programatically.  I have followed this training topics.

https://cpcontents.adobe.com/public/newlearner/newlearner_652fc808.html?accountId=32503#/course/8587...

AEM 6.4: Modifying Users and Groups

But still i got error like below.

javax.jcr.LoginException: Can neither derive user name nor principal names for bundle com.abc.dummy-proj [547] and sub service null

at org.apache.sling.jcr.base.AbstractSlingRepository2.loginService(AbstractSlingRepository2.java:385) [org.apache.sling.jcr.base:3.0.4]

at com.abc.ModifyPermissions.modifyPermissions(ModifyPermissions.java:43)

This line of coed throws the error: adminSession = repository.loginService(null, repository.getDefaultWorkspace());

Let me know what exactly the issue.

Regards

Mahesh

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

Could you please try with subservice session

Service Users in AEM



Arun Patidar

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi,

Could you please try with subservice session

Service Users in AEM



Arun Patidar