I am using AEM 6.1 and trying to create session object. I have followed below steps -
1. Created a system user using crx explorer - demoUser
2. In OSGI configuration updated user mapper service for the bundle id service details
<bundle-id>:writeService=demoUser
where bundle id is the actual id of bundle.
3. Try to get session using slingrepository.login("writeService",null) in my slingservlet. i am getting error Login Exception, with the following message: LoginException. org.apache.sling.api.resource.LoginException: Cannot derive user name for bundle
Has anyone faced similar issue? All inputs are much appreciated.