[jboss-user] [JBoss Web Services] - cannot be cast to javax.servlet.Servlet

PRAVEEN KONDAKA do-not-reply at jboss.com
Fri Apr 15 17:23:45 EDT 2011


PRAVEEN KONDAKA [http://community.jboss.org/people/pkondaka1] created the discussion

"cannot be cast to javax.servlet.Servlet"

To view the discussion, visit: http://community.jboss.org/message/600386#600386

--------------------------------------------------------------
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 

@WebMethod
public String sayHello(String name)
{
  return "Hi " + name + " from the New York.";
}

<servlet>
  <display-name>Hello Web Service</display-name>
  <servlet-name>HelloService</servlet-name>
  <servlet-class>xxx.xxxx.xxxx.xxxx.Hello</servlet-class>
  <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
  <servlet-name>HelloService</servlet-name>
  <url-pattern>/HelloService</url-pattern>
</servlet-mapping>
.
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.

PLEASE HELP ME
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/600386#600386]

Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110415/ac0cff50/attachment.html 


More information about the jboss-user mailing list