Details
Description
When the connection when executing WebService all is interrupted or timed out, there is some kind of racing issue and the result is
(the stacktrace and src code is from v. 2.7.11, but the same code is also in the other versions)
Caused by: java.lang.NullPointerException
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:396)
I suppose the problem is that when the connection is timed out/closed, the
destroy() method is called in ClientImpl, where there is a statement that sets
responseContext = null;
and then in the finalize block of the invoke, there is the code that produces the NPE:
} finally {
if (context != null) {
Map<String, Object> resp = CastUtils.cast((Map<?, ?>)context.get(RESPONSE_CONTEXT));
if (resp != null)
}
}
One possible solutions is to add verification also for not null value in responseContext.