5 Replies Latest reply on Nov 7, 2011 1:54 PM by Peter Johnson

    JBoss does not have a Servlet implementation

    Marten Lienen Newbie

      Hi,

      I am using org.jboss.resteasy.plugins.guice.GuiceResteasyBootstrapServletContextListener as a servlet listener and have also set resteasy.scan.resources to true. This leads to the following error:

      13:44:28,824 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/project]] (MSC service thread 1-4) Exception sending context initialized event to listener instance of class org.jboss.resteasy.plugins.guice.GuiceResteasyBootstrapServletContextListener: java.lang.NoClassDefFoundError: javax/servlet/ServletContext

                at org.scannotation.WarUrlFinder.findWebInfClassesPath(WarUrlFinder.java:56) [scannotation-1.0.3.jar:]

                at org.jboss.resteasy.plugins.server.servlet.ListenerBootstrap.getScanningUrls(ListenerBootstrap.java:64) [resteasy-jaxrs-2.2.1.GA.jar:]

                at org.jboss.resteasy.plugins.server.servlet.ConfigurationBootstrap.createDeployment(ConfigurationBootstrap.java:147) [resteasy-jaxrs-2.2.1.GA.jar:]

                at org.jboss.resteasy.plugins.server.servlet.ListenerBootstrap.createDeployment(ListenerBootstrap.java:32) [resteasy-jaxrs-2.2.1.GA.jar:]

                at org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap.contextInitialized(ResteasyBootstrap.java:27) [resteasy-jaxrs-2.2.1.GA.jar:]

                at org.jboss.resteasy.plugins.guice.GuiceResteasyBootstrapServletContextListener.contextInitialized(GuiceResteasyBootstrapServletContextListener.java:22) [resteasy-guice-2.3-beta-1.jar:]

                at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [:1.7.0_147-icedtea]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [:1.7.0_147-icedtea]

                at java.lang.Thread.run(Thread.java:722) [:1.7.0_147-icedtea]

       

      Why is there no class definition for javax.servlet.ServletContext? My maven dependencies do not cover it so it should find the implementation which JBoss must have.

       

      I am using JBoss 7.0.2.

       

      Thanks in advance,

      CQQL