RDE environment - authentication issue - login exception | Community
Skip to main content
Level 2
March 13, 2026
Question

RDE environment - authentication issue - login exception

  • March 13, 2026
  • 1 reply
  • 47 views

Hi, I have setup a new RDE environment and pushed code using aio cli commands and the site content packages were uploaded using the package manager UI.

When I try to preview the Home page of the site, it throws the following error. 

com.natixis.core.utils.ResourceResolverUtil unable to get resource resolver, authentication issue
org.apache.sling.api.resource.LoginException: Cannot derive user name for bundle natixis.core [660] and sub service natixisServices
    at org.apache.sling.resourceresolver.impl.ResourceResolverFactoryImpl.getServiceResourceResolver(ResourceResolverFactoryImpl.java:82)

This issue is happening only on RDE environment. Can you please suggest what could be the root cause of this happening only on RDE environment? 

The service mapping values all looks good, similar to other working environments.

    1 reply

    AmitVishwakarma
    Community Advisor
    Community Advisor
    March 13, 2026

    Hi ​@ViaVu 

    Root cause:

    org.apache.sling.api.resource.LoginException: Cannot derive user name for bundle natixis.core [660] and sub service natixisServices means:

    • Sling cannot find a service user mapping for bundle = natixis.core, subservice = natixisServices
    • or the mapped system user doesn't exist / has no rights.

    On your dev/stage/prod this works because those environments already have:

    • A system user (created via repoinit)
    • A ServiceUserMapper OSGi config mapping natixis.core:natixisServices → that system user

    Your RDE starts as a clean AEM, and only what you deploy via aio aem:rde:install and packages exists there. If you did not deploy the repoinit + service user mapping config into RDE (or they are runmode‑scoped so they don't apply to rde), then only RDE will fail.

    Things to check in RDE

    On the RDE author:

    • Check service user mapping actually exists
      • Go to:
        • /system/console/status-slingserviceusermappings (Status -> Sling Service User Mappings)
        • Look for a line like:  natixis.core : natixisServices -> natixis-service-user
        • If missing, your org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-*.cfg.json with something like:
          {
          "user.mapping": [
          "natixis.core:natixisServices=[natixis-service-user]"
          ]
          }

          is simply not deployed (or not active for RDE).

    • Check system user exists

      • In CRX/Repo Browser (or CRXDE if accessible), verify that the mapped user exists, e.g.: /home/users/system/cq:services/natixis/natixis-service-user

      • In AEM as a Cloud Service this user must be created by repoinit, via an OSGi config like:

        {
        "scripts": [
        "create service user natixis-service-user with forced path system/cq:services/natixis",
        "set principal ACL for natixis-service-user \n allow jcr:read,rep:write on /content \n end"
        ]
        }

        If this node isn't there in RDE, the repoinit config that creates it hasn't been installed.

    • Make sure these configs are deployed into RDE

      • In Cloud projects the above usually lives in:

        • ui.config (or all) as:

          • org.apache.sling.jcr.repoinit.repositoryInitializer~*.cfg.json

          • org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-*.cfg.json

      • To fix RDE you must:

        • Build your full project (or at least the module that contains both repoinit and mapper config)

        • Deploy it to RDE:

          aio aem:rde:install ./all/target/your-project.all-*.zip
          # or the ui.config/ui.apps package that contains those configs

          And avoid runmode suffixes that exclude RDE, e.g. configs named only for dev / stage. Either:

        • Make them runmode‑agnostic, or

        • Include rde in the runmode if you are using runmode-specific config folders.

    • Code side

      • Your code should be doing something like:

        Map<String, Object> authInfo = Collections.singletonMap(
        ResourceResolverFactory.SUBSERVICE, "natixisServices");
        try (ResourceResolver rr = resourceResolverFactory.getServiceResourceResolver(authInfo)) {
        ...
        }

        Since the stack trace already shows sub service natixisServices, this is probably fine; the problem is almost certainly the missing mapping/user in RDE.

     

    Amit Vishwakarma - Adobe Commerce Champion 2025 | 16x Adobe certified | 4x Adobe SME
    ViaVuAuthor
    Level 2
    March 13, 2026

    @AmitVishwakarma Thank you for your review/suggestions. I checked the RDE to make sure the following config files exist. 

    repoinit configuration...

    ServiceUserMapperImpl

    These configurations seem to be similar in other working environments as well. 

    Apparently, something failed retrieving the resource resolver and it is throwing a null pointer exception / LoginException. So, the code was unable to get the resource resolver which eventually caused the authentication issue. 

    Since all expected config files exist in RDE similar to other working environments, what could be the root cause for RDE not able to retrieve the resource resolver? 

    Thank you for your help!

    AmitVishwakarma
    Community Advisor
    Community Advisor
    March 14, 2026

    Hi ​@ViaVu 
    thanks for sharing the screenshots – they help narrow it down.

    From your screenshots we can see that:

    • org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl~natixis contains natixis.core:natixisServices=[natixis-user-service], and
    • org.apache.sling.jcr.repoinit.RepositoryInitializer~natixis creates the natixis-user-service and sets ACLs.

    So the problem is no longer "config files are missing", but that Sling still cannot resolve that mapping at runtime. In AEM CS / RDE this can only happen for a few reasons:

    • Mapping is not actually active for that bundle + subservice
    • Please check the status page, not only the config page:
      • Open: /system/console/status-slingserviceusermappings
      • Look for an entry exactly like:
        natixis.core : natixisServices -> natixis-user-service

        If this line is not present, then the mapping in Web Console is not being picked up (wrong PID, wrong runmode, or another config overriding it).

    • Bundle symbolic name or subservice doesn't match

      • In the error you posted the bundle is: natixis.core [660] and subservice natixisServices.

      • In the mapping it must be exactly the same (natixis.core:natixisServices – case‑sensitive, no extra spaces).

      • In code, also confirm:

        Map<String, Object> authInfo =
        Collections.singletonMap(ResourceResolverFactory.SUBSERVICE, "natixisServices");
        resourceResolverFactory.getServiceResourceResolver(authInfo);

        A very small mismatch like "natixisService" vs "natixisServices" or a trailing space will lead to exactly the Cannot derive user name error, even though the config "looks" correct.

      • More than one ServiceUserMapperImpl config, one of them wrong
        In /system/console/configMgr search for ServiceUserMapperImpl:

        • Ensure there isn't a second config (e.g. org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl~somethingElse) that also mentions natixis.core but with a different/empty mapping.

        • If there is, fix or delete the conflicting one so only the correct mapping remains.

    In short, given your screenshots the issue is still with the service mapping resolution, not a generic "authentication" problem. The first thing I would check next is the status page (/system/console/status-slingserviceusermappings) – if your natixis.core:natixisServices line does not show up there, Sling will always throw the exact LoginException you are seeing on RDE.

    Amit Vishwakarma - Adobe Commerce Champion 2025 | 16x Adobe certified | 4x Adobe SME