Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

AEM Error | Login Failure: all modules ignored

Avatar

Level 6

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.

1 Accepted Solution

Avatar

Correct answer by
Level 6

It worked fine after creating system user and assigned all permission on /content folder.

View solution in original post

9 Replies

Avatar

Level 10

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.

Avatar

Level 6

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.

Avatar

Level 6

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?

Avatar

Level 2

you should give Bundle Symbolic name. Check once in POM file and copy paste in OSGi User Mapper service configuration.

Avatar

Correct answer by
Level 6

It worked fine after creating system user and assigned all permission on /content folder.

Avatar

Level 1

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 ?

Avatar

Level 6

Full permission is needed only in /content folder

Not all folders.

Avatar

Level 1

But this is not the problem right ? All folder permission includes '/content' folder also.