Getting error Recursion too deep Exception | Community
Skip to main content
March 28, 2023
Solved

Getting error Recursion too deep Exception

  • March 28, 2023
  • 1 reply
  • 2016 views

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

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Rohan_Garg

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.

1 reply

Rohan_Garg
Community Advisor
Rohan_GargCommunity AdvisorAccepted solution
Community Advisor
May 17, 2023

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.