Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

AEM 6.2: NonExistingResource for node under etc

Avatar

Level 3

Hi,

Is there any change in behaviour of ResourceResolver(org.apache.sling.api.resource) in AEM 6.2 because it returns me NonExistingResource when trying to resolve resource(node) under /etc/xxx.

This used to work fine in AEM 6.0 SP3.

For example, We have few data pages under /etc/lists/top-navigation-configuration-page which we(anonymous users in publish) were able to resolve in WCMUse classes in AEM 6.0 SP3 using getResourceResolver.resolve("etc/lists/top-navigation-configuration-page"). But this piece of code is returning NonExistingResource in AEM 6.2. However, using service resource resolver(resolverFactory.getServiceResourceResolver(param)), resources under /etc/xxx are resolved.

Thanks in advance

1 Accepted Solution

Avatar

Correct answer by
Employee

Every user has permissions, also the anonymous user.

Since 6.1 those permissions are more strict in /etc

View solution in original post

8 Replies

Avatar

Level 3

Hi Feike Visser,

The issue is in publish for anonymous user.

Avatar

Employee

Validate the ACL/permissions, they have changed since 6.1.

It is most likely an issue with permissions.

Avatar

Level 2

I believe, you should create a System User and get resource resolver using Resource Resolver Factory and then try to resolve any path.

Avatar

Level 3

Hi Feike,

Permissions for anonymous user? Can you please elaborate.

Avatar

Level 3

Hi bhaskar3bk,

The approach you have mentioned i.e. service resource resolver(in AEM 6.2) is a replacement for admin resource resolver(in AEM 6.0), but the issue i reported is about resource resolver implicit object in AEM component jsp or WCMUse class unable to resolve resources under /etc/*** even the cloud service configurations.

In AEM 6.0 SP3, we were able to resolve without admin resource resolver.

Avatar

Correct answer by
Employee

Every user has permissions, also the anonymous user.

Since 6.1 those permissions are more strict in /etc

Avatar

Level 3

Hi Feike,

Thanks for the information. Anonymous user do not have read permissions in AEM 6.2 but available in AEM 6.0.

Workaround is to get service resource resolver and resolve resources under /etc/xxx