I've been following the "Querying Adobe Experience Manager 6.4 JCR data using the QueryBuilder API" tutorial.
Adobe Experience Manager Help | Querying Adobe Experience Manager 6.4 JCR data using the QueryBuilde...
I'm currently using AEM 6.5 and I create the project using archetype version 18 and not 13.
However I've been having trouble with the Sling servlet, I've pretty much followed the tutorial exactly.
The get Employees button in the HTL sends a JQuery AJAX request to post data to a Sling Servlet.
The path which I set in the servlet is:
Constants.SERVICE_DESCRIPTION + "=Simple Demo Servlet",
"sling.servlet.methods=" + HttpConstants.METHOD_GET,
I try to access this servlet by:
data:'type=' + 'data',
var xml = msg;
var oTable = $('#myTable').dataTable();
//Loop through this function for each Employee element in the returned XML
var $field = $(this);
var Name = $field.find('Name').text();
var Job = $field.find('Position').text();
var Address = $field.find('Address').text();
var Age = $field.find('Age').text();
var Date = $field.find('Date').text();
var Salary = $field.find('Salary').text();
//Set the new data
However I'm getting the error below.
*INFO* [0:0:0:0:0:0:0:1  GET /bin/myCustData HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /bin/myCustData not found
The QUeryJCR64 - CoreQUeryJCR64.core bundle is active and the servlet is being registered. But there is no path field showing?
Any clues on what might be the problem would be appreciated,
pointers below might help you debug.
1. Check if your servlet is being Resolved http://localhost:4502/system/console/servletresolver , Give your Servlet path and see what is the serving url.
2. Check if the OSGI Component is Active or not, An osgi component may not be in active state if all its references are not satisfied.
Go to http://localhost:4502/system/console/components , Search with fully qualified name of your Osgi Component e.g
3. You can check if your Servlet path is allowed in Apache Sling Servlet/Script Resolver and Error Handler
As you pointed out that was for AEM 6.4 and tested on that version. I am not sure if something would need to be modified to work on AEM 6.5 and Maven Arch 18.