//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 .
Solved! Go to Solution.
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.
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
Views
Replies
Total Likes
What's the error?
Views
Replies
Total Likes
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
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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.
Thanks folks it got resolved .
Problem may be with user permisiion I restarted the server and it worked
Views
Replies
Total Likes
Views
Likes
Replies