cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: WebFault serialVersionUID problem
Date Tue, 14 Sep 2010 19:46:20 GMT

Can you test this with 2.2.10?  We recently added a flag to wsdl2java to have 
it generate serialVersionUID things so it SHOULD work.  If not, any chance you 
can produce a test case?

Thanks!
Dan
 

On Monday 13 September 2010 11:19:34 am Alexander Woude wrote:
> Guys, I need some help cos I dont see what I am doing wrong.
> 
> I try to create a webfault( code at bottom) . I use CXF 2.2.6, jdk1.6.0_20
> and tomcat 6.0.28. But when I test the service I always get this error:
> 
> 
> 3-sep-2010 17:09:38 org.apache.cxf.interceptor.ClientFaultConverter
> processFaultDetail INFO: Exception occurred while creating exception: Can
> not set static final long field
> zz.service.klantservice.KlantFault.serialVersionUID to java.lang.Long
> java.lang.IllegalAccessException: Can not set static final long field
> zz.service.klantservice.KlantFault.serialVersionUID to java.lang.Long at
> sun.reflect.UnsafeFieldAccessorImpl.throwFinalFieldIllegalAccessException(
> UnsafeFieldAccessorImpl.java:55) at
> sun.reflect.UnsafeFieldAccessorImpl.throwFinalFieldIllegalAccessException(
> UnsafeFieldAccessorImpl.java:59) at
> sun.reflect.UnsafeQualifiedStaticLongFieldAccessorImpl.set(UnsafeQualified
> StaticLongFieldAccessorImpl.java:59) at
> java.lang.reflect.Field.set(Field.java:657)
>     at
> org.apache.cxf.interceptor.ClientFaultConverter.convertFaultBean(ClientFau
> ltConverter.java:288) at
> org.apache.cxf.interceptor.ClientFaultConverter.processFaultDetail(ClientF
> aultConverter.java:180) at
> org.apache.cxf.interceptor.ClientFaultConverter.handleMessage(ClientFaultC
> onverter.java:80) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCha
> in.java:243) at
> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(A
> bstractFaultChainInitiatorObserver.java:96) at
> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessag
> e(CheckFaultInterceptor.java:69) at
> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessag
> e(CheckFaultInterceptor.java:34) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCha
> in.java:243) at
> org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:672) at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespon
> seInternal(HTTPConduit.java:2210) at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespon
> se(HTTPConduit.java:2087) at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPCo
> nduit.java:1985) at
> org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputS
> tream.java:47) at
> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188) at
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66) at
> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:640) at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInt
> erceptor.handleMessage(MessageSenderInterceptor.java:62) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCha
> in.java:243) at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:484) at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:310) at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:262) at
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124) at
> $Proxy49.geefKlantBijBsn(Unknown Source)
>     at zz.client.Client.main(Client.java:76)
> Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Fault
> occurred while processing. at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146) at
> $Proxy49.geefKlantBijBsn(Unknown Source)
>     at zz.client.Client.main(Client.java:76)
> Caused by: org.apache.cxf.binding.soap.SoapFault: Fault occurred while
> processing. at
> org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshal
> Fault(Soap11FaultInInterceptor.java:75) at
> org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMes
> sage(Soap11FaultInInterceptor.java:46) at
> org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMes
> sage(Soap11FaultInInterceptor.java:35) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCha
> in.java:243) at
> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(A
> bstractFaultChainInitiatorObserver.java:96) at
> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessag
> e(CheckFaultInterceptor.java:69) at
> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessag
> e(CheckFaultInterceptor.java:34) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCha
> in.java:243) at
> org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:672) at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespon
> seInternal(HTTPConduit.java:2210) at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespon
> se(HTTPConduit.java:2087) at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPCo
> nduit.java:1985) at
> org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputS
> tream.java:47) at
> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188) at
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66) at
> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:640) at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInt
> erceptor.handleMessage(MessageSenderInterceptor.java:62) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCha
> in.java:243) at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:484) at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:310) at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:262) at
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> 
> 
> Any ideas?
> 
> Regards,
> Alex
> 
> 
> ##### CODE FOR FAULT CLASS #######
> package zz.service.klantservice;
> 
> import javax.xml.ws.WebFault;
> 
> @WebFault
> public class KlantFault extends Exception {
> 
>     private static final long serialVersionUID = -3607154010022389749L;
> 
>     private String details;
> 
>     public KlantFault(String details)
>     {
>         super();
>         this.details = details;
>     }
> 
>     public String getFaultInfo() {
>         return details;
>     }
> }

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Mime
View raw message