title: Websphere : ClassCastException for Webservice
body: <p>I have an EAR module which contian ejb client, structs web module and webservice which created by annotation. Application works fine and wsdl is published in JBOSS. But in websphere it gives</p>
  
  <pre><code>java.lang.ClassCastException SourceId:com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet ProbeId:213 Reporter:com.ibm.ws.webcontainer.servlet.ServletWrapper$1@3ae83ae8
  java.lang.ClassCastException: com.test.eventmanagement.ws.EventManagementWS incompatible with javax.servlet.Servlet
  </code></pre>
  
  <p>The have the follwoing jar files in my lib.</p>
  
  <pre><code>commons-beanutils-1.7.0.jar,commons-digester-1.8.jar,commons-fileupload-1.1.1.jar,
  freemarker-2.3.8.jar,gson-1.7.1.jar,itext-2.0.8.jar,javaee-api-5.jar,
  jxl-2.6.10.jar,ognl-2.6.11.jar,retrotranslator-runtime-1.0.4.jar,
  struts2-core-2.1.8.1.jar,struts2-tiles-plugin-2.1.8.1.jar,
  tiles-api-2.1.0.jar,tiles-compat-2.1.0.jar,tiles-core-2.1.0.jar,
  tiles-jsp-   2.1.0.jar,tiles-servlet-2.1.0.jar,xwork-core-2.1.6.jar
  </code></pre>
  
  <p>In my web.xml i have added</p>
  
  <pre><code>&lt;!-- Web Service --&gt;
  &lt;servlet&gt;
      &lt;servlet-name&gt;EventManagementWS&lt;/servlet-name&gt;
      &lt;servlet-class&gt;com.test.eventmanagement.ws.EventManagementWS&lt;/servlet-class&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;EventManagementWS&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/EventManagementWS&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>I have googled a lot but still nothing helped me. Some where i have read that its because of jar conflict, but i am not able to find it.</p>