title: ResourceResolverFactory getServiceResourceResolver throws Exception in AEM 6.1
body: <p>I want to write some data to AEM, and the below code works fine for me in AEM 6.0 but not in AEM 6.1 , always throws a Login Exception as follows:</p>
  
  <p>"<em>Login Exception when obtaining a CRX User for the Service:'writeService'.org.apache.sling.api.resource.LoginException: Cannot derive user name for bundle group.tti.commons-service [395] and sub service writeService</em>"</p>
  
  <p>OSGI Config:</p>
  
  <p><img src="https://i.stack.imgur.com/gddVN.jpg" alt="enter image description here"></p>
  
  <p>Code in my class:</p>
  
  <pre><code>import javax.jcr.Session;
  import org.apache.sling.api.resource.ResourceResolver;
  import org.apache.sling.api.resource.ResourceResolverFactory;
  ....
  @Reference
  private ResourceResolverFactory factory;
  private ResourceResolver resourceResolverWriter;
  private static Session adminSession;
  ...
  ...
  Map&lt;String, Object&gt; param = new HashMap&lt;String, Object&gt;();        
      param.put(ResourceResolverFactory.SUBSERVICE, "writeService");
  try {
    resourceResolverWriter = factory.getServiceResourceResolver(param);            
    adminSession = resourceResolverWriter.adaptTo(Session.class);
  ...
  } catch (LoginException e) {
  ...
  }
  </code></pre>
  
  <p>Am i missing anything on AEM 6.1?</p>