Expand my Community achievements bar.

SOLVED

System user AEM 6.4

Avatar

Level 7

//this all for creating session from resource resolver factory
   Map<String, Object> usermap = new HashMap<String, Object>();
   usermap.put(ResourceResolverFactory.SUBSERVICE, "customreporting");
   ResourceResolver resourceResolver = null;
  try {

// resourceResolver = resourceResolverFactory.getResourceResolver(usermap);
resourceResolver = resourceResolverFactory.getServiceResourceResolver(usermap);
   logger.info("Resolved user: " + resourceResolver.getUserID());
   } catch (LoginException e) {

  e.printStackTrace();
   }

this code is not working ...

Mapping configuration is also correct.

in path /apps/system/config/***********

# Configuration created by Apache Sling JCR Installer

service.ranking=I"0"

user.mapping=["AEMMaven13.core:customreporting\=customreportinguser"]

user customreportinguser having all the permission.

Please let me know what can be the issue .

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You can also check whether this servlet is not being included in multiple bundles http://localhost:4502/system/console/components and search for your servlet.

View solution in original post

6 Replies

Avatar

Level 7

Entry from manifest.mf file :

Bundle-Name: AEMMaven13 - Core

Bundle-SymbolicName: AEMMaven13.core

Bundle-Version: 1.0.0.SNAPSHOT

I used bundle symbolic name for mapping

Mapping in User mapper service amendment clicking on plus sign

AEMMaven13.core:customreporting=customreportinguser

Avatar

Level 7

during accessing it is showing me internal 500 server error .

logs in error.logs file

19.10.2019 01:32:47.885 *WARN* [0:0:0:0:0:0:0:1 [*********************] GET /bin/commentexcelreporting HTTP/1.1] com.day.cq.wcm.core.impl.components.ComponentCacheImpl Requested Path /bin/commentexcelreporting.servlet is not in available search paths

Avatar

Community Advisor

This is not an error it's a warning.

If you are getting  500 error that means you are able to hit the servlet and you are getting 500 error at some specific line can you let us know that specific code.

Avatar

Correct answer by
Community Advisor

You can also check whether this servlet is not being included in multiple bundles http://localhost:4502/system/console/components and search for your servlet.

Avatar

Level 7

Thanks folks it got resolved .

Problem may be with user permisiion I restarted the server and it worked