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

Apache sling Service User Mapper Service Amendment Configuring issue

Avatar

Level 3

Hello Team,

                  Am using 6.1.  I have created service user and given required permissions in useradmin. When am trying to map the service user in Apache sling Service User Mapper Service Amendment, i have given pwcm.core.schedulers:EventArchiveService=testSystemUser and clicked save but the issue is when i refresh i don't see any value in service mappings its becoming empty and i get the login error in error logs. I don't understand why the value is clearing off from fellix console. 

 

Do anyone seen same kind of issue?

Thanks in advance

-Sai

1 Accepted Solution

Avatar

Correct answer by
Level 10

Follow this article and video. 

http://scottsdigitalcommunity.blogspot.ca/2014/12/querying-adobe-experience-manager-6.html

You should be using:  Apache Sling Service User Mapper service - not Apache Sling Service User Mapper Service Amendment.

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

Follow this article and video. 

http://scottsdigitalcommunity.blogspot.ca/2014/12/querying-adobe-experience-manager-6.html

You should be using:  Apache Sling Service User Mapper service - not Apache Sling Service User Mapper Service Amendment.

Avatar

Administrator

Please have a loom at this:

Link:- http://stackoverflow.com/a/31394583/6433590

Process 1:

Step 1: Create a new system user. to do this

Open http://localhost:4502/crx/explorer/index.jsp

Login as admin > Open 'User Administration > Select 'Create System User' > Enter "user id" > Hit the Green button (you will not se a save button :)

I have created "abcwriteservice" user

Step 2: Go to Permissions, and for the user 'abcwriteservice' give Permissions to access the folder where you'd like to write. (In this example: /etc/userdata ) 

Step 3: Open OSGI console and go to "Apache Sling Service User Mapper Service" to define the service-user mapping. For example: 'group.commons-service:writeService=abcwriteservice'

Step 4: In code, i added extra parameter, as:

Map<String, Object> param = new HashMap<String, Object>(); param.put(ResourceResolverFactory.SUBSERVICE, "writeService"); try { resourceResolverWriter = factory.getServiceResourceResolver(param); if (resourceResolverWriter == null) throw new Exception("Could not obtain a CRX User for the Service:'writeService'"); Node usersRootNode = adminSession.getNode("/etc/userdata/users");

I hope this helps.

~kautuk



Kautuk Sahni