Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Getting error Recursion too deep Exception

Avatar

Level 1

I was trying to add some functionality in core component container. So when I added some styling properties like width,height to container component ,there was option in container component for selecting Layout ,so when I chose  simple layout and try to add some component in container component I am getting error of recursion too deep exception in sightly.I will post the error too. If you guys have any solution then please recommend.

org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.request.RecursionTooDeepException: /content/us/en/test/learning/jcr:content/root/container/container

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @surajtripathi,

 

Can you post the sightly/html file of the container component?

The RecursionTooDeepException is thrown by the Sling implementation if to many recursive content inclusions take place. The limit of recursive inclusions is implementation dependent.

 

One suggestion if using <sly data-sly-resource>, provide ${resource.path} or ${currentPage.path} as opposed to ${resource} to avoid looking for all resources under current resource.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @surajtripathi,

 

Can you post the sightly/html file of the container component?

The RecursionTooDeepException is thrown by the Sling implementation if to many recursive content inclusions take place. The limit of recursive inclusions is implementation dependent.

 

One suggestion if using <sly data-sly-resource>, provide ${resource.path} or ${currentPage.path} as opposed to ${resource} to avoid looking for all resources under current resource.