Expand my Community achievements bar.

Sling Model with custom selector not working in AEM 6.5

Avatar

Level 2

Hi All,

 

I am using a Sling model exporter to export json data in AEM 6.5 and using the selector "caas". When the selector is "model" , it works perfectly. However with custom selector , it shows the below error.

 

Invalid recursion selector value 'caas'

Cannot serve request to /content/abc/internal/exportsite/en/clientaccess/help/secondlevela/level3.caas.json in org.apache.sling.servlets.get.DefaultGetServlet

 

Already tried the below:

check if this helps - Re: Sling Exporter with custom selector

22 Replies

Avatar

Level 2

We are doing some POC on local environment, before deciding the actual design.

Avatar

Level 1

Hi Vikram, 

Add the caas.json.jsp file in the project and update its content as below: 

 

/apps/cq/Page/caas.json.jsp 

<%@include file="/libs/cq/Page/proxy.jsp" %>

 

Update the workspace filter so changes are picked up: 

<filter root="/apps/cq/Page">

 

This should work. You can add multiple selectors with this way. 

 

Another solution is to combine your custom selector with the OOTB model selector e.g model.caas