com.day.cq.wcm.core.impl.components.ComponentCacheImpl Requested Path xxxxx.servlet is not in available search paths

Avatar

Avatar

umamaheswariy65

Avatar

umamaheswariy65

umamaheswariy65

13-03-2018

Servlet everything looks good but not able to access the servlet after this warning it throwing the exception

org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught Throwable

javax.servlet.ServletException: Not a Sling HTTP request/response

Any ideas why this is happening.

Thanks In Advance.

View Entire Topic

Avatar

Avatar

mind119497

Avatar

mind119497

mind119497

13-03-2018

Thanks for the reply.

Here is the code for the servlet

@SlingServlet(paths = { "/services/all-sample" }, methods = { "GET", "POST" })
public class xxxxxxxx extends SlingAllMethodsServlet {
private static final long serialVersionUID = 1L;
private static final Logger logger = LoggerFactory.getLogger(xxxxxxxxx.class);

@Override
protected final void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response)
   throws ServletException, IOException {
  logger.info("Able to hit in");

}

@Override
protected final void doPost(SlingHttpServletRequest request, SlingHttpServletResponse response)
   throws ServletException, IOException {
}

}

Have 2 bundles both activate state in console.

The same code able to access from the another bundle but trying to add servlets in the 2nd bundle. From the 2nd bundle not able to access the servlets.

Thanks

Uma