cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Ma <...@iona.com>
Subject Re: Invocation of init method failed; nested exception is java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.
Date Tue, 18 Dec 2007 03:51:12 GMT
It is definitely an issue in Aegis databinding.  TypeCreator is failed 
to cast a generic type which added in TypeClassInfo
to Class object .
I have filled a JIRA issue for this : 
https://issues.apache.org/jira/browse/CXF-1309

Jim



Jayakumar wrote:
> Created the sample using the aegis binding configured in spring.
> TypeClassInfo class return the generic Type as
> javax.xml.ws.Holder<java.lang.String> which throws the below error.
>
> It is a bug or do am i missing any annotation? anyway to work it out.
>
> @javax.jws.WebService (targetNamespace="http://example.com/")
> @javax.xml.ws.BindingType(value =
> "http://www.w3.org/2003/05/soap/bindings/HTTP/")  
> @SOAPBinding(style=SOAPBinding.Style.DOCUMENT, use=SOAPBinding.Use.LITERAL,
> parameterStyle=SOAPBinding.ParameterStyle.BARE)
> public interface IExample {
>
> 	@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> 	public IResponseParameter getExample(@WebParam(name = "parameters")
> 	IRequestParameter a, @WebParam(name = "C", header=true, mode=Mode.INOUT)
> 	Holder<String> c);
>
> }
>
> <Dec 16, 2007 10:58:15 AM EST> <Warning> <HTTP> <BEA-101162>
<User defined
> listener org.springframework.web.context.ContextLoaderListener failed:
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'example1': Invocation of init method failed; nested exception is
> java.lang.ClassCastException:
> sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'example1': Invocation of init method failed; nested exception is
> java.lang.ClassCastException:
> sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl
> 	at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1174)
> 	at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
> 	at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
> 	at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
> 	at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
> 	Truncated. see log file for complete stacktrace
> java.lang.ClassCastException:
> sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl
> 	at
> org.apache.cxf.aegis.type.AbstractTypeCreator.createHolderType(AbstractTypeCreator.java:146)
> 	at
> org.apache.cxf.aegis.type.AbstractTypeCreator.createTypeForClass(AbstractTypeCreator.java:112)
> 	at
> org.apache.cxf.aegis.databinding.AegisDatabinding.getParameterType(AegisDatabinding.java:448)
> 	at
> org.apache.cxf.aegis.databinding.AegisDatabinding.initializeMessage(AegisDatabinding.java:257)
> 	at
> org.apache.cxf.aegis.databinding.AegisDatabinding.initializeOperation(AegisDatabinding.java:218)
> 	Truncated. see log file for complete stacktrace
>   
> <Dec 16, 2007 10:58:15 AM EST> <Error> <Deployer> <BEA-149231>
<Unable to
> set the activation state to true for the application '_appsdir_CXF203_dir'.
> weblogic.application.ModuleException: 
> 	at
> weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:950)
> 	at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:353)
> 	at
> weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
> 	at
> weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
> 	at
> weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
> 	Truncated. see log file for complete stacktrace
> java.lang.ClassCastException:
> sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl
> 	at
> org.apache.cxf.aegis.type.AbstractTypeCreator.createHolderType(AbstractTypeCreator.java:146)
> 	at
> org.apache.cxf.aegis.type.AbstractTypeCreator.createTypeForClass(AbstractTypeCreator.java:112)
> 	at
> org.apache.cxf.aegis.databinding.AegisDatabinding.getParameterType(AegisDatabinding.java:448)
> 	at
> org.apache.cxf.aegis.databinding.AegisDatabinding.initializeMessage(AegisDatabinding.java:257)
> 	at
> org.apache.cxf.aegis.databinding.AegisDatabinding.initializeOperation(AegisDatabinding.java:218)
> 	Truncated. see log file for complete stacktrace
>   
>
> Thanks
> Jay
>
>
>
>   

Mime
View raw message