cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: NullPointerException due to missing JAXBContext in DataWriterImpl(CXF Version: 2.7.3)
Date Mon, 07 Mar 2016 19:50:33 GMT
The NPE is occurring while trying to write out Headers.   I would look at where you may be
creating any custom Header objects.  CXF is calling:

DataBinding b = header.getDataBinding();

which is apparently returning a JAXBDataBinding, but the JAXBContext within that JAXBDataBinding
is null.   I’m not really sure how that would occur unless there is some sort of problem
creating the context.    Anyway, definitely look to wherever the Header objects are being
created.

Also: most importantly, upgrade to the latest 3.x versions.   2.7.x is no longer supported.

Dan




> On Mar 7, 2016, at 9:53 AM, Balana, Vishal <Vishal.Balana@fmr.com.INVALID> wrote:
> 
> Hello All,
> 
> CXF Version: 2.7.3
> 
> We are trying to call the soap web service using JaxWsClientProxy and occasionally getting
NullPointerException from Interceptor chain as following:
> I am trying to understand the possible scenario where JAXBContext could go null and continuing
my research but it would be of great help
> If any of you could provide any lead on it please.
> Also I am seeing the Inteceptor chain throwing NPE is taking more than 1000ms before
writing to server.
> 
> java.lang.NullPointerException
> at org.apache.cxf.jaxb.io.DataWriterImpl.createMarshaller(DataWriterImpl.java:101)
> at org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:169)
> at org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnvelopeStart(SoapOutInterceptor.java:156)
> at org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage(SoapOutInterceptor.java:81)
> at org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage(SoapOutInterceptor.java:61)
> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
> at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
> at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:133)
> 
> 
> More information:
> 
> I came across the following thread but it doesn't have the solution to the problem:
> http://cxf.547215.n5.nabble.com/CXF-Client-performance-troubleshooting-td5738660.html
> 
> We have the exact same problem where 80% of time it performs great and 20% of time it
doesn't.
> I found following 2 log entries in our logs with 200ms difference between and have seen
this time going up into seconds sometime:
> 
> 2016-02-26 14:06:11,672 [makeTrustDecision] - No Trust Decider for Conduit '{http://www.xxx.com/wsdl}myPort.http-conduit'.
An afirmative Trust Decision is assumed.
> 2016-02-26 14:06:11,898 [onFirstWrite] - Sending POST Message with Headers to https://my.service.com/test/services
Conduit :{http://www.xxx.com/wsdl}myPort.http-conduit
> 
> And I suspect the NPE which we saw mentioned in following email appears before above
2 log statements, So NPE case also seems related to performance issue :
> 
> 2016-02-26 14:06:11,671 [doIntercept] - Invoking handleMessage on interceptor org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor@c0a3ed1
> 
> So in short I am asking 2 questions here:
> 1.            Why so much of time consumption in No Trust Decider for Conduit & Sending
POST Message log statements?
> &&
> 2.            Why NPE in SoapOutInterceptor which happens just before above statements?
> 
> If any more information required please let me know and any direction would be of great
help.
> 
> 
> Thanks,
> Vishal

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Mime
View raw message