Expand my Community achievements bar.

SOLVED

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

Avatar

Community Advisor

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

7 Replies

Avatar

Level 10

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

Avatar

Community Advisor

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.

Avatar

Level 10

Can you show code where error is thrown?

Avatar

Community Advisor

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.

Avatar

Correct answer by
Community Advisor

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

Avatar

Level 10

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

Avatar

Level 4

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