• 1 reply
  • Latest Post - ‏2012-09-04T13:42:31Z by Michael Burati
1 Post

Pinned topic Websphere : ClassCastException ncompatible with javax.servle for Webservice

‏2012-09-01T06:22:18Z |
I am using WAS 7.0 Developer version. I am not able to get the wsdl file.
FFDC error log is attached.It works fine with jboss.

FFDC Error:
FFDC Exception:java.lang.ClassCastException ProbeId:213$1@6e986e98
java.lang.ClassCastException: incompatible with javax.servlet.Servlet

My web.xml:

<!-- Web Service -->

WimsEventManagementWS is webservice created using @webservice and @webmethod annotation.

I am using struts 2.0 framework

The have the follwoing jar files in my lib.

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-,struts2-tiles-plugin-, 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
Updated on 2012-09-04T13:42:31Z at 2012-09-04T13:42:31Z by Michael Burati
  • Michael Burati
    Michael Burati
    352 Posts

    Re: Websphere : ClassCastException ncompatible with javax.servle for Webservice

    This forum is for the discussion of questions/issues around consuming web services with the IBM Web Experience Factory tooling, and as such is typically monitored by experts in that area.

    Your issue does not seem related to Web Experience Factory, so you may find more answers on a WAS WS forum.

    It does look like the main cause of that error is the following line in that stack trace:

    java.lang.ClassCastException: incompatible with javax.servlet.Servlet

    and a likely cause of that is a version mismatch between the version of the servlet API that the class was generated with vs the version you're trying to use it with.