3 Replies Latest reply on May 14, 2015 7:09 PM by Tomaz Cerar

    @WebListener Component

    daslan govender Newbie

      Hi

       

      I have the following:

       

      @WebListener

      public class ApplicationControllerListener implements ServletContextListener {

      .....

      }

       

       

      This does NOT deploy on Wildfly. Error below.

       

       

      Your assistance will be greatly appricated!

       

      tks,

      daslan

       

      22:43:49,399 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.undertow.deployment.default-host./fndsprocessor-web.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-host./fndsprocessor-web.UndertowDeploymentInfoService: Failed to start service

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1900) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_06]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_06]

        at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_06]

      Caused by: java.lang.IllegalArgumentException: UT010009: Servlet ApplicationControllerListener of type class za.co.fnds.web.servlets.ApplicationControllerListener does not implement javax.servlet.Servlet

        at io.undertow.servlet.api.ServletInfo.<init>(ServletInfo.java:92)

        at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:462)

        at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:217)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1944) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1877) [jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]

        ... 3 more

        • 1. Re: @WebListener Component
          jaikiran pai Master

          Caused by: java.lang.IllegalArgumentException: UT010009: Servlet ApplicationControllerListener of type class za.co.fnds.web.servlets.ApplicationControllerListener does not implement javax.servlet.Servlet

            at io.undertow.servlet.api.ServletInfo.<init>(ServletInfo.java:92)

           

          My guess is that your application has perhaps listed that listener as a servlet class which it obviously isn't.

          • 2. Re: @WebListener Component
            D P Apprentice

            I am getting similar error java.lang.IllegalArgumentException: UT010009: Servlet xyz of type class xyzpkg.abcServletClass does not implement javax.servlet.Servlet.

             

            Servlet.jar is in classpath. Servlet is extending HttpServlet.

             

            Any idea why I am getting this error ?

             

            Thanks in advance.

            • 3. Re: @WebListener Component
              Tomaz Cerar Master

              remove servlet.jar (or any other spec jar that server provides) from your deployment

               

              yes that means from your WEB-INF/lib or your.ear/lib