cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Freeman Fang <>
Subject Re: ClassCastException in BindingProvider casting when using CXF 2.4.2 on WAS 6.1 environment
Date Wed, 08 Aug 2012 01:07:10 GMT

This kind issue generally is from that webServiceEndpoint and BindingProvider are loaded from
different class loaders, so it's definitely a class loader issue. I'm not sure if there's
a way to completely bypass the class loader configuration in WAS. Where the geronimo-jaxws_2.2_spec-1.0.jar
exist? It's in container lib or in your project lib? If both exist I think you can remove
one from your project lib.

Freeman Fang

Twitter: freemanfang

On 2012-8-8, at 上午3:56, gsbashal wrote:

> My Web service Project is running on WAS 6.1 version with using CXF 2.4.2
> libraries and it is configured in Maven pom files. This web service project
> is working fine through our My tester application ( Dummy Consumer
> Application ) and Non mavenized consumer application.  If one of the
> consumer application ( which is mavenized ) is adding same jar dependencies
> in their pom files and try to launch Credit Card application then it is
> hitting with below error at runtime. In below code for JAXWSExecutor class
> we are casting webServiceEndpoint object ( which is the instance of
> JaxWsClientProxy) to BindingProvider. As per IBM recommendation to handle
> this situation we did some settings in Server admin console for the
> classloader if we are using third party JAX-WS web services and it is
> working fine. But Consumer application want different solution which is
> without classloader setting and it should be handled through Maven pom
> settings or some other configuration without class loader. Because changing
> the class loader policy is not acceptable by the Runtime team at my client. 
> IBM Link :
> Error :
> java.lang.ClassCastException: $Proxy48 incompatible with
> 	at
> sf.reqfwk.executor.JAXWSExecutor.setHeaderDetails(
> 	at sf.reqfwk.executor.JAXWSExecutor.execute(
> JAXWSExecutor code where it is hitting with classcast exception
> BindingProvider bp = (BindingProvider) webServiceEndpoint;  ( where
> BindingProvider is of geronimo-jaxws_2.2_spec-1.0.jar )
> So, Could you please suggest what is the solution without changing
> classloader policy.
> --
> View this message in context:
> Sent from the cxf-issues mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message