org.apache.sling.api.resource.LoginException: Cannot derive user name for bundle xxx.xxx.xxx [] and sub service | Community
Skip to main content
VeenaVikraman
New Participant
Nov 1, 2017 5:21 AM UTC
Solved

org.apache.sling.api.resource.LoginException: Cannot derive user name for bundle xxx.xxx.xxx [] and sub service

Hi All

     I have an exact same problem as mentioned here org.apache.sling.api.resource.LoginException: Cannot derive user name for bundle com.mycompany.core [472] and sub servic…  . So for this long time I used to go directly to the Felix console and add the Service User details in the Apache Sling Service User Mapper

So the problem I face is :- I am trying to create a config node for org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl in my project . All the values are reflecting fine in the config when I check . But still it throws me the above error.

     But if I go directly to the felix and add the value directly as I used to before , it just works perfect. Have someone face the same issue before ?

Why I cannot go and edit directly in felix console ? - > So the CSE who does our deployments won't be making any changes in the felix console directly. Anything we need to deploy should be deployed as config nodes. And for some reason , even though the config values are reflecting in the felix console, it always throw me the above error.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
VeenaVikraman
VeenaVikramanAccepted solution
New Participant
Nov 1, 2017 5:10 PM UTC

I am not able to replicate this now . I did a restart of the server and seems like my config values are getting picked  

7 replies

CT1012
Level 4
Dec 12, 2017 3:20 PM UTC

Can you please give us more info on this

- Will it automatically create system user or we need to do it form the same old crx/explorer ?? Is system user=principal name?

-The ACE's added, will they automatically take care of permissions so that we no need to change anything from user admin?

Please add anything you want to inform on this

TIA

Translate
smacdonald2008
Level 10
Nov 1, 2017 5:12 PM UTC

I am glad its picking up the values. I have not seen that before.

Translate
VeenaVikraman
VeenaVikramanAuthorAccepted solution
New Participant
Nov 1, 2017 5:10 PM UTC

I am not able to replicate this now . I did a restart of the server and seems like my config values are getting picked  

Translate
VeenaVikraman
New Participant
Nov 1, 2017 4:30 PM UTC

Ya scott. I am trying to draft this down neatly to give you all more insight on my issue. I need to get a sample code setup as I cannot share the one which I am currently working on.

Translate
smacdonald2008
Level 10
Nov 1, 2017 1:37 PM UTC

Can you show code where error is thrown?

Translate
VeenaVikraman
New Participant
Nov 1, 2017 12:10 PM UTC

edubey​ But my issue is different here. I am trying to set the Apache Sling Service User Mapper Configuration as a config value in my project.

Translate
edubey
Level 10
Nov 1, 2017 6:32 AM UTC

CSE is right, as part of the deployment, its always good have config present in deployment package rather making changes in Felix console which eventually gets stored in /apps/system/config.

I would recommend using Ensure Service User from ACS Commons, it takes care of service user deployment with code package

Ensure Service User

Thanks

Translate