Error while Debugging in AEM Wknd: URL Not hitting the servlet | Community
Skip to main content
Level 3
December 14, 2023
Solved

Error while Debugging in AEM Wknd: URL Not hitting the servlet

  • December 14, 2023
  • 2 replies
  • 902 views

I was trying to run aem as a cloud service in debug mode in local

I followed the below steps

1) started aem using: java -Xmx2048M -agentlib:jdwp=transport=dt_socket,address=8888,server=y,suspend=n -jar aem-author-p4502.jar

2) built the project using : mvn clean install -PautoInstallPackage

3) Ran the aem debug remote config 

4) hit the url : http://localhost:4502/content/wknd/us/en.newavailability.json?vegId=9

5) Was getting exception as in the attached document 'Invalid_Recursion_Selector.txt'

6) hit the url: http://localhost:4502/content/wknd/us/en/newavailability.json?vegId=9

7) Was getting exception as in the attached document 'AEM_ResourceNotFound.txt'

 

The github link is:  https://github.com/vineetham123/aem-guides-wknd

Attaching relevant screenshots as well

 

 

 

 

 

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 lukasz-m

Hi @vineetham123,

The root cause of the problem is due to the fact you are adding selector newavailability into cq:Page request.

Base on the implementation of NewAvailabilityServlet.java, it can be seen that this servlet requires node with wknd/components/page resource type.

wknd/components/page resource type is stored under jcr:content node

To make it work you have to add newavailability selector requesting for jcr:content, e.g.

http://localhost:4502/content/wknd/us/en/jcr:content.newavailability.json?vegId=9

2 replies

Community Advisor
December 14, 2023
lukasz-m
Community Advisor
lukasz-mCommunity AdvisorAccepted solution
Community Advisor
December 14, 2023

Hi @vineetham123,

The root cause of the problem is due to the fact you are adding selector newavailability into cq:Page request.

Base on the implementation of NewAvailabilityServlet.java, it can be seen that this servlet requires node with wknd/components/page resource type.

wknd/components/page resource type is stored under jcr:content node

To make it work you have to add newavailability selector requesting for jcr:content, e.g.

http://localhost:4502/content/wknd/us/en/jcr:content.newavailability.json?vegId=9
Level 3
December 15, 2023

Thank you @lukasz-m for the correct response. Could you please tell me how to redirect the response to a webpage, rather than just show the result in a console.