hi all I have extends a sip servlet
and after I run the server I have the errorpackage org.example.servlet.sip; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.sip.SipServlet; import javax.servlet.sip.SipServletRequest; import javax.servlet.sip.SipServletResponse; public class SimpleServlet extends SipServlet { /** * */ public SimpleServlet() { // TODO Auto-generated constructor stub System.out.println("hi \n amer22222222 \n"); } private static final long serialVersionUID = -468618845319795003L; @Override protected void doRegister(SipServletRequest req) throws ServletException, IOException { System.out.print("hi \n hi \n hi \n hi \n hi \n"); } public void doInvite(SipServletRequest request) { System.out.println("*** Received INVITE ***"); try { request.createResponse(SipServletResponse.SC_RINGING).send(); //request.createResponse(SipServletResponse.SC_OK).send(); } catch (IOException e) { e.printStackTrace(); } } public void doCancel(SipServletRequest request) { System.out.println("*** Received CANCEL ***"); try { request.createResponse(SipServletResponse.SC_REQUEST_TERMINATED).send(); } catch (IOException e) { e.printStackTrace(); } } @Override public void init(ServletConfig servletConfig) throws ServletException { System.out.println("****** the simple sip servlet has been started ********* \n ya rab"); } }
HTTP Status 500 -
please I need help any Ideas ?
the error stack
# Sep 27, 2010 2:06:10 AM org.apache.catalina.core.StandardWrapperValve invoke # SEVERE: Servlet.service() for servlet SimpleServlet threw exception # java.lang.ClassCastException: org.apache.catalina.connector.RequestFacade cannot be cast to javax.servlet.sip.SipServletRequest # at javax.servlet.sip.SipServlet.service(SipServlet.java:325) # at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) # at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) # at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) # at org.mobicents.servlet.sip.startup.SipStandardContextValve.invoke(SipStandardContextValve.java:248) # at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) # at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) # at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) # at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) # at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) # at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) # at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) # at java.lang.Thread.run(Thread.java:619)