Error only on publisher : LoginException: Cannot derive user name for bundle and sub service | Community
Skip to main content
Level 2
March 5, 2024

Error only on publisher : LoginException: Cannot derive user name for bundle and sub service

  • March 5, 2024
  • 2 replies
  • 1069 views

Hi,

I have a service user who is mapped to two subservices Example:

<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="sling:OsgiConfig"
user.mapping="[aem-demo-test.core:demoService=demo-admin]"
/>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="sling:OsgiConfig"
user.mapping="[aem-test2.core:oldDemoService=demo-admin]"
/>

 This works fine in author but does not work only on publisher. It also works on publisher after I restart publisher. 

I get this error on publisher:

org.apache.sling.api.resource.LoginException: Cannot derive user name for bundle aem-demo-test.core [620] and sub service demoService.

It all works fine after I restart the bundle. 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Imran Khan
Community Advisor
Community Advisor
March 5, 2024

@sindhusr It may be you local AEM instance issue. Do you see this error on DEV/QA environments or developers machine also ? 

Can you once try creating new instance and verify once may not be having this issue

sindhusrAuthor
Level 2
March 5, 2024

Hi Imran, this happens across all environments. Dev/qa and uat, prod. The solution of restart works for now but that’s not the ideal solution . 

Imran Khan
Community Advisor
Community Advisor
March 5, 2024

@sindhusr 

Please check if you are seeing any error while deploying code. If not, I would suggest here to raise an Adobe ticket as it is a common and we are easily replicate this issue.

kautuk_sahni
Community Manager
Community Manager
March 14, 2024

@sindhusr Did you find the suggestion from the user helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni