Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ACS Common Generic List - Throwing exception if am trying to add more than 10 items #2783

Open
3 tasks
sambasivaraj opened this issue Feb 7, 2022 · 6 comments

Comments

@sambasivaraj
Copy link

sambasivaraj commented Feb 7, 2022

Required Information

  • AEM Version, including Service Packs, Cumulative Fix Packs, etc: AEM Cloud Version 2022.1.6228.20220123T154100Z
  • ACS AEM Commons Version: 5.1.2
  • Reproducible on Latest? YES

Expected Behavior

I should be able to add as many items using the Generic list ACS Common feature

Actual Behavior

If am trying to add more than 10 items to generic list , am getting the exception as below
aused by: org.apache.sling.api.SlingException: javax.servlet.ServletException: javax.servlet.jsp.JspTagException: org.apache.sling.api.request.TooManyCallsException: BundledScriptServlet (/libs/granite/ui/components/coral/foundation/form/field/field.jsp) at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspExceptionInternal(JspServletWrapper.java:685) [org.apache.sling.scripting.jsp:2.5.2] at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:602) [org.apache.sling.scripting.jsp:2.5.2] at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:519) [org.apache.sling.scripting.jsp:2.5.2] at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:445) [org.apache.sling.scripting.jsp:2.5.2] at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.callJsp(JspScriptEngineFactory.java:501) [org.apache.sling.scripting.jsp:2.5.2] at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngineFactory.java:586) [org.apache.sling.scripting.jsp:2.5.2] at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:388) [org.apache.sling.scripting.core:2.3.6]

Steps to Reproduce

Create a latest Local AEM SDK version
Deploy ACC Common 5.1.2 version
Navigate to http://localhost:4502/generic-lists.html/etc/acs-commons/lists
Create a generic list
Add more than 10 items in the list and observe the behaviour
User will see too many call exception in the error log and you will be able to view all the items in Generic list UI

@hearora
Copy link

hearora commented Mar 3, 2022

did u try updating the number of calls per per request in apache Sling man servlet configuration ? Hope this helps
image

@adamcin
Copy link
Contributor

adamcin commented Mar 3, 2022

This ticket could be resolved using a REQUEST-scope Filter to override the sling.max.calls for the genericlist.html request by setting a request attribute of the same name to an Integer that is either -1 or some multiple of the number of items in the chosen list, before the page servlet begins rendering the response. (cc: @Derthenier )

see:
https://github.com/apache/sling-org-apache-sling-engine/blob/aa77c90fd80039b92880025cd00fc621afec4f6f/src/main/java/org/apache/sling/engine/impl/request/RequestData.java#L116-L119
https://github.com/apache/sling-org-apache-sling-engine/blob/aa77c90fd80039b92880025cd00fc621afec4f6f/src/main/java/org/apache/sling/engine/impl/request/RequestData.java#L641-L665

@SachinMali
Copy link
Contributor

Apart from above option to BUMP the 'Number Of calls Per Request', the latest ACS Commons release 5.2.0 might help to resolve it. Please check...

@adamcin
Copy link
Contributor

adamcin commented Mar 3, 2022

@SachinMali I believe the 5.2.0 solution depends on generic list localization being disabled. It doesn't fix the situation if localization is desired.

@SachinMali
Copy link
Contributor

Its possible but if localization is desired and you have few (5-10) Localized languages (and NOT ALL) and your list items are not as huge as 'font-awesome-icons' (675 items) without tweaking the above config will work. In summary above OSGi Config can be optional for >10 items and maybe an upper limit of 100.

@davidjgonzalez
Copy link
Contributor

I think @adamcin suggestion might be best -- otherwise I think a rewrite that simplifies the impl could be a reasonable option. (maybe something more akin to how it was originally designed - just not sure about back compat to the current version)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants