5 Replies Latest reply on Feb 1, 2007 3:04 PM by Joan Horta Tosas

    What does "[DeployerInterceptorJSE] Cannot load servlet clas

    Ricardo Felipe Newbie

      When i deploy my app i get this warn

      "13:17:30,626 WARN [DeployerInterceptorJSE] Cannot load servlet class: mypackage.MyServlet"
      


      Any idea about why does it happen

        • 1. Re: What does
          Peter Johnson Master

          Please post the relevant contents of your web.xml file, and also the layout of your war file (and the layout of the jar files if your servlet classes are in jar files).

          • 2. Re: What does
            Ricardo Felipe Newbie

            Thanks, you address me and i just solved my problem

            • 3. Re: What does
              raj singh Newbie

              What was the solution? I have the same problem.

              I have a dead simple web.xml:

              <web-app>
               <display-name>UMI</display-name>
               <description>UMI web service interfaces</description>
               <servlet>
               <servlet-name>TEST</servlet-name>
              <servlet-class>org.rajsingh.umi.service.client.BasetableService</servlet-class>
               </servlet>
               <servlet-mapping>
               <servlet-name>TEST</servlet-name>
               <url-pattern>/test</url-pattern>
               </servlet-mapping>
              </web-app>



              and a very basic test servlet:
              public class BasetableService extends HttpServlet {
               @Override
               protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
               doXMLResponse("<msg><content>Hello EJB!</content></msg>", res);
               }
              
               public static void doXMLResponse(String xml, HttpServletResponse res) throws IOException {
               res.setContentType("text/xml");
               res.getWriter().write(xml);
               res.getWriter().close();
               }
              }


              and here's the war file listing:
              META-INF/
              META-INF/MANIFEST.MF
              org/
              org/rajsingh/
              org/rajsingh/umi/
              org/rajsingh/umi/service/
              org/rajsingh/umi/service/BasetableService.class
              WEB-INF/
              WEB-INF/web.xml


              • 4. Re: What does
                raj singh Newbie

                Oh man I wish I could delete that post. Seing it posted finally made recognize the class path in web.xml is wrong.

                • 5. Re: What does
                  Joan Horta  Tosas Novice

                  But rajrsingh, the problem you have is that your classes must be under WEB-INF/classes folder (move the org directory into WEB-INF/classes)