4 Replies Latest reply on Jan 31, 2013 5:55 AM by Bartosz Majsak

    showcase jaxws error cannot be cast to javax.servlet.Servlet

    Alexis Krier Newbie

      Hello all, I was playing with the show case exemples.

      i have a problem to run the jaxws test with glassfish embedded (as well for tomcat embedded)

       

      when running his command:

      arquillian-showcase\jaxws>mvn -Parq-tomcat6-embedded clean package

       

      the test EchoWebServiceEndpointTestCase fails with

      WARNING: StandardWrapperValve[EchoService]: PWC1382: Allocate exception for servlet EchoService

      java.lang.ClassCastException: com.acme.jaxws.EchoWebServiceEndpointBean cannot be cast to javax.servlet.Servlet

              at com.sun.enterprise.web.WebContainer.createServletInstance(WebContainer.java:729)

              at com.sun.enterprise.web.WebModule.createServletInstance(WebModule.java:1959)

              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1264)

              at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:1071)

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:189)

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)

              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)

              at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)

              at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)

              at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)

              at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)

              at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)

              at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)

              at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)

              at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)

              at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)

              at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)

              at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)

              at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)

              at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)

              at com.sun.grizzly.ContextTask.run(ContextTask.java:71)

              at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)

              at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)

              at java.lang.Thread.run(Thread.java:722)

       

      Note that to run it under glassfish I have to set the webxml version to in the test:

      WebAppDescriptor webXml = Descriptors.create(WebAppDescriptor.class).metadataComplete(true).version("3.0");

       

      Any idea about what's wrong?

       

      thx and nice job for thuis showcase.