Skip to main content
Level 3
Nov 21, 2016 9:57 AM UTC
Solved

AEM 6.2: NonExistingResource for node under etc

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Feike_Visser1
Feike_Visser1Accepted solution
Adobe Employee
Nov 22, 2016 7:40 AM UTC

Every user has permissions, also the anonymous user.

Since 6.1 those permissions are more strict in /etc

8 replies

Feike_Visser1
Adobe Employee
Adobe Employee
Nov 21, 2016 11:11 AM UTC

author or publish?

Translate
Level 3
Nov 21, 2016 1:08 PM UTC

Hi Feike Visser,

The issue is in publish for anonymous user.

Translate
Feike_Visser1
Adobe Employee
Adobe Employee
Nov 21, 2016 2:14 PM UTC

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

It is most likely an issue with permissions.

Translate
bhaskar3bk
Level 2
Nov 21, 2016 8:27 PM UTC

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

Translate
Level 3
Nov 22, 2016 2:13 AM UTC

Hi Feike,

Permissions for anonymous user? Can you please elaborate.

Translate
Level 3
Nov 22, 2016 2:19 AM UTC

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.

Translate
Feike_Visser1
Adobe Employee
Feike_Visser1Adobe EmployeeAccepted solution
Adobe Employee
Nov 22, 2016 7:40 AM UTC

Every user has permissions, also the anonymous user.

Since 6.1 those permissions are more strict in /etc

Translate
Level 3
Nov 22, 2016 9:04 AM UTC

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

Translate