10 Replies Latest reply on Apr 18, 2011 2:28 PM by Peter Johnson

    cannot be cast to javax.servlet.Servlet


      Hello Folks,


      This might be a duplicate post, but honestly i couldn't find any solutions to this. please help me.


      I am trying to expose my POJO as web service using maven. I have _logic.jar, _war.war and _logic jar is available in WEB-INF/lib/_logic.jar


      Have a POJO based on javax.jws.* and have simple method



      public String sayHello(String name)


        return "Hi " + name + " from the New York.";




        <display-name>Hello Web Service</display-name>










      I am getting following error while deploying

      java.lang.ClassCastException: mil.oni.gdb.webservice.Hello cannot be cast to javax.servlet.Servlet


      Do i need to add/edit any other files like jboss-web.xml or any other configuration file missing? I was googling for long time, but couldn't find any solution.