Expand my Community achievements bar.

SOLVED

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

Avatar

Level 3

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

 

 

 

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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.

servlet-resource-type.jpg

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

crx.jpg

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

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

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.

servlet-resource-type.jpg

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

crx.jpg

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

Avatar

Level 3

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.