Expand my Community achievements bar.

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

Avatar

Level 2

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. 

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

6 Replies

Avatar

Level 10

@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

Avatar

Level 2

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 . 

Avatar

Level 10

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

Avatar

Level 2

This is the error I see 

"org.apache.sling.api.resource.LoginException: Cannot derive user name for bundle aem-demo-test.core [620] and sub service demoService." but I don't understand how it works on author. It also works on publisher after restart.

Avatar

Administrator

@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