Highlighted

AEM Servlet internal server error

Avatar

Avatar

AdobeID24

Avatar

AdobeID24

AdobeID24

18-10-2019

I registered my servlet like below :

@Component(service= Servlet.class,
   property={

  Constants.SERVICE_DESCRIPTION + "=custom reporting servlet",
   "sling.servlet.paths="+ "/bin/commentexcelreporting"

   })

   public class CommentReporting  extends SlingAllMethodsServlet {

doget()

}

but during accessing it is showing me internal 500 server error .

logs in error.logs file

19.10.2019 01:32:47.885 *WARN* [0:0:0:0:0:0:0:1 [*********************] GET /bin/commentexcelreporting HTTP/1.1] com.day.cq.wcm.core.impl.components.ComponentCacheImpl Requested Path /bin/commentexcelreporting.servlet is not in available search paths

P.S.  I have also checked in configuration /bin/ is allowed

Please note : I am using aem 6.4 version ....

1845715_pastedImage_4.png

Please let me know what can be the issue ?

In lower version of AEM like 6.0 with @slingservlet(path="") in this format whole code was working .

Bundle is active ....I can see my servlet as well inside the bundle .