title: ResourceResolverFactory is NULL (Adobe Experience Manager AEM)
body: <p>I am trying to get a reference to the ResourceResolver from the ResourceResolverFactory as follows:</p>
  
  <pre><code>@Reference
  private ResourceResolverFactory resourceResolverFactory;
  
  public void someMethod() {
      Map&lt;String, Object&gt; authenticationMap = new HashMap&lt;String, Object&gt;();
          authenticationMap.put(ResourceResolverFactory.USER, "user");
          authenticationMap.put(ResourceResolverFactory.PASSWORD, "pwd");
  
          //This line returns NullPointerException
          ResourceResolver resourceResolver =   resourceResolverFactory.getResourceResolver(authenticationMap); 
  }
  </code></pre>
  
  <p>Can someone please tell me what I am doing wrong? The AEM API version v6.0.</p>