I'm new to AEM and have been trying to connect to a servlet on an AEM project package which I installed on a new AEM instance.
It seems as if servlet cannot be found or the path cannot be found for the servlet and have double checked the mapping but am lost to what else I can look at. Any help would be greatly appreciated!
Sling Mapping
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:Mapping"
sling:internalRedirect="content/dam/test.$1.json"
sling:match="aem.test.com.4545/api/assets/v1/(.*)"/>
Servlet Information
`@Component(service = Servlet.class,
property = {
Constants.SERVICE_DESCRIPTION + "=Get Job Folder Info API",
"sling.servlet.methods=" + HttpConstants.METHOD_POST,
"sling.servlet.resourceTypes=" + "sling/servlet/default",
"sling.servlet.selectors=" + "jobFolderInfo",
"sling.servlet.extensions=" + APIConstants.JSON_EXTENSION_TYPE
})
public class JobFolderInfoServlet extends SlingAllMethodsServlet {`
Error log from request
0 TIMER_START{Request Processing}
1 COMMENT timer_end format is {<elapsed microseconds>,<timer name>} <optional message>
6 LOG Method=POST, PathInfo=null
7 TIMER_START{handleSecurity}
1645 TIMER_END{1636,handleSecurity} authenticator org.apache.sling.auth.core.impl.SlingAuthenticator@5f62558d returns true
1876 TIMER_START{ResourceResolution}
3112 TIMER_END{1234,ResourceResolution} URI=/api/assets/v1/jobFolderInfo resolves to Resource=NonExistingResource, path=/apps/content/dam/test.jobFolderInfo.json
3119 LOG Resource Path Info: SlingRequestPathInfo: path='/apps/content/dam/test.jobFolderInfo.json', selectorString='jobFolderInfo', extension='json', suffix='null'
3119 TIMER_START{ServletResolution}
3122 TIMER_START{resolveServlet(/apps/content/dam/test.jobFolderInfo.json)}
3853 TIMER_END{730,resolveServlet(/apps/content/dam/test.jobFolderInfo.json)} Using servlet com.test.assets.api.servlets.JobFolderInfoServlet
3856 TIMER_END{736,ServletResolution} URI=/api/assets/v1/jobFolderInfo handled by Servlet=com.test.assets.api.servlets.JobFolderInfoServlet
3860 LOG Applying Requestfilters
3864 LOG Calling filter: com.adobe.granite.resourceresolverhelper.impl.ResourceResolverHelperImpl