2 Replies Latest reply on Aug 18, 2015 5:56 PM by Abhishek Abhishek

    Error while deploying the War with Jersery Rest

    Abhishek Abhishek Newbie

      Hi,

      I am trying to deploy a ear in wildfly8.0.0Final and getting following exceptions:

      2015-04-28 13:56:46,561 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./system8/cb/admin.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./system8/cb/admin.UndertowDeploymentInfoService: Failed to start service

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

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_45]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_45]

        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_45]

      Caused by: java.lang.IllegalArgumentException: UT010009: Servlet JerseyWebApp of type class com.sun.jersey.spi.container.servlet.ServletContainer 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:606)

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

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

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

        ... 3 more

       

      I went through the code of ServletInfo.java, it has a check at line 92:

      if (!Servlet.class.isAssignableFrom(servletClass)) {

            throw UndertowServletMessages.MESSAGES.servletMustImplementServlet(name, servletClass);

       

      I tested at in eclipse that

      javax.servlet.Servlet.class.isAssignableFrom(com.sun.jersey.spi.container.servlet.ServletContainer.class) returns true.

       

      Any pointer to handle this exception are helpful.

      Thanks in Advance.