ResourceResolverFactory.getServiceResourceResolver(param) returns "null" in Eventlistener Activate method
I am facing an issue in AEM 6.5.12 Event Listener. Where I am trying to get the resourceresolver using resourceresolverfactory service user using a Util class. This resolver is used to get the session for the observationmanager. The service user is created via repo init with all the permissions and amended via service user mapping. But during the Eventlistener OSGi component activation the resourceresolverfactory.getserviceresourceresolver(param) returns null and the Eventlistener fails Activation. But after manually stoping and activating the Eventlistener component it is able to get the resourceresolver via the service user and the entire functionality works perfect. Could you please suggest how can I get the service user before the bundle/component activation ?
Request your Inputs, Thanks a lot
