Hi
Thanks for reporting it
Dan helped me to get to the bottom of the problem, has been fixed:
https://issues.apache.org/jira/browse/CXF-6252
Thanks, Sergey
On 10/02/15 03:07, jordan wrote:
Hi,
I found there is a issue:
When client with a response filter (empty operation is enough) to request an
async request to a non-exist url, cxf client will report a NPE and make the
async thread hand:
java.lang.NullPointerException
at
org.apache.cxf.jaxrs.client.spec.ClientResponseFilterInterceptor.getResponse(ClientResponseFilterInterceptor.java:79)
at
org.apache.cxf.jaxrs.client.spec.ClientResponseFilterInterceptor.handleMessage(ClientResponseFilterInterceptor.java:60)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
......
I check the code and found the method:
ClientResponseFilterInterceptor.getResponse
ResponseBuilder rb = JAXRSUtils.toResponseBuilder((Integer)
inMessage.get(Message.RESPONSE_CODE));
rb.entity(inMessage.get(InputStream.class));
If the URL which client request is not exist, then the (Integer)
inMessage.get(Message.RESPONSE_CODE) is null, so report NPE.
So that I cannot continue....
Could you please help take a look. Thanks!!
The full exception stack:
java.lang.NullPointerException
at
org.apache.cxf.jaxrs.client.spec.ClientResponseFilterInterceptor.getResponse(ClientResponseFilterInterceptor.java:79)
at
org.apache.cxf.jaxrs.client.spec.ClientResponseFilterInterceptor.handleMessage(ClientResponseFilterInterceptor.java:60)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
at
org.apache.cxf.jaxrs.client.ClientMessageObserver.onMessage(ClientMessageObserver.java:56)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:1154)
at
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$3.run(AutomaticWorkQueueImpl.java:428)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627)
at
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$AWQThreadFactory$1.run(AutomaticWorkQueueImpl.java:353)
at java.lang.Thread.run(Thread.java:863)
--
View this message in context:
http://cxf.547215.n5.nabble.com/Report-NPE-when-client-async-request-a-non-exist-URI-tp5754128.html
Sent from the cxf-user mailing list archive at Nabble.com.