AEM 6.5 p.nodedepth working on Query Builder Debugger but not java servlet
I am attempting to use query builder to get all of the values of all instances of a specific component, including the file path for the image within the child component.
I am successfully able to get all values of the component including the child image component using:
path= /content/site
1_property=sling:resourceType
1_property.value=site/components/structure/article/articleHead
2_property=articleTags
2_property.operation=like
2_property.value=forum:topic
p.nodedepth=2
p.hits=full
output from Json Query Builder Link:
{
"success": true,
"results": 1,
"total": 1,
"more": false,
"offset": 0,
"hits": [
{
"jcr:path": "/content/site/template-test/jcr:content/root/responsivegrid_534909131/responsivegrid/articlehead",
"jcr:primaryType": "nt:unstructured",
"facebookSocialShare": "true",
"jcr:createdBy": "admin",
"articlePublishDate": "Wed May 15 2024 00:00:00 GMT-0400",
"jcr:lastModifiedBy": "admin",
"articleTitle": "Test Article",
"jcr:created": "Wed May 01 2024 14:12:13 GMT-0400",
"articleTags": [
"forum:topic"
],
"jcr:lastModified": "Wed May 15 2024 13:39:48 GMT-0400",
"sling:resourceType": "site/components/structure/article/articleHead",
"mediaDescription": "Pictured: Maecenas venenatis diam sit amet massa commodo, non pulvinar tortor bibendum. Morbi ut efficitur metus, at scelerisque massa.",
"mediaType": "image",
"articleImage": {
"jcr:primaryType": "nt:unstructured",
"jcr:lastModifiedBy": "admin",
"newtab": "false",
"fileName": "default-image.png",
"alt": "Default Image",
"jcr:lastModified": "Thu May 02 2024 14:29:07 GMT-0400",
"linkType": "anchorLink",
"sling:resourceType": "site/components/content/image",
"isDecorative": "false",
"file": {
"jcr:primaryType": "nt:file",
"jcr:createdBy": "admin",
"jcr:created": "Wed May 15 2024 13:39:03 GMT-0400",
"jcr:content": {
"jcr:primaryType": "nt:resource",
"jcr:lastModifiedBy": "admin",
"jcr:mimeType": "image/png",
"jcr:lastModified": "Thu May 02 2024 14:29:01 GMT-0400",
":jcr:data": 985648,
"jcr:uuid": "4a9c0f95-4f01-4d3f-ade1-9892e5ce5446"
}
}
}
}
]
}However in my servlet, I am not getting back the "article image" object as shown above but I am still getting all other data.
Here is the code for the predicate in the servlet:

