Hi All,
My below code is throwing exception, i am using AEM6.0. Followed all the instructions as suggested in http://adobeaemclub.com/access-to-resourceresolver-in-osgi-services-aem-6-1/
Map<String,Object> paramMap = new HashMap<String,Object>();
paramMap.put(ResourceResolverFactory.SUBSERVICE, "readService");
log.info("After the param");
ResourceResolver rr = null;
try{
rr = resourceFactory.getServiceResourceResolver(paramMap);
} catch(Exception ex) {
}
And below is the exception
org.apache.sling.api.resource.LoginException: Login Failure: all modules ignored
at org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory.getLoginException(JcrResourceProviderFactory.java:394)
at org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory.getResourceProviderInternal(JcrResourceProviderFactory.java:333)
at org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory.getResourceProvider(JcrResourceProviderFactory.java:201)
at org.apache.sling.resourceresolver.impl.tree.ResourceProviderFactoryHandler.login(ResourceProviderFactoryHandler.java:164)
at org.apache.sling.resourceresolver.impl.tree.RootResourceProviderEntry.loginToRequiredFactories(RootResourceProviderEntry.java:95)
at org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl.getResourceResolverInternal(CommonResourceResolverFactoryImpl.java:154)
at org.apache.sling.resourceresolver.impl.ResourceResolverFactoryImpl.getServiceResourceResolver(ResourceResolverFactoryImpl.java:91)
at org.test.test.core.service.impl.ReadServiceImpl.listTitles(ReadServiceImpl.java:34)
Please advise to resolve the error.
Solved! Go to Solution.
It worked fine after creating system user and assigned all permission on /content folder.
You want to use the Sling Mapping service. See this HelpX video and corresponding article. The video shows you all steps in action: http://scottsdigitalcommunity.blogspot.ca/2014/12/querying-adobe-experience-manager-6.html?m=0.
Views
Replies
Total Likes
I followed exactly same thing in video also tried like below in 'Apache Sling Service User Mapper Service'
org.test.test.core.aem-sample-project-core:readService=admin
Still getting same error.
Since i am using AEM6.0 so system user option is not present i guess.
Correct me if i am wrong.
Views
Replies
Total Likes
Try a normal user on AEM 6
Views
Replies
Total Likes
Hi,
I tried normal user also. Still same error.
Please note my bundle full name is aem-sample-project-core-1.0.0-SNAPSHOT.jar and what i added in 'Apache Sling Service User Mapper Service' is org.test.test.core.aem-sample-project-core:readService=testreaduser
And package name where my sling component exist is org.test.test.core.service.impl
What's wrong i am doing, please advise?
Views
Replies
Total Likes
you should give Bundle Symbolic name. Check once in POM file and copy paste in OSGi User Mapper service configuration.
Views
Replies
Total Likes
It worked fine after creating system user and assigned all permission on /content folder.
I have created a system user and give all the permission but still I am getting "Cannot derive user name for bundle com.xyz-aem.core [475] and sub service testService". It is a login exception. What is the wrong thing I am doing ? Any idea ?
Views
Replies
Total Likes
Full permission is needed only in /content folder
Not all folders.
Views
Replies
Total Likes
But this is not the problem right ? All folder permission includes '/content' folder also.
Views
Replies
Total Likes
Views
Likes
Replies