Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.2
-
None
Description
Some WS-RM scenarios may sometimes result in the following exception at the provider/server side under the piggyback mode..
java.lang.NullPointerException: null
at org.apache.cxf.ws.addressing.ContextUtils$2.getBackChannel(ContextUtils.java:471) ~[org.apache.cxf.cxf-bundle-2.3.2.jar:2.3.2]
at org.apache.cxf.interceptor.OneWayProcessorInterceptor.handleMessage(OneWayProcessorInterceptor.java:87) ~[na:na]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255) ~[org.apache.cxf.cxf-bundle-2.3.2.jar:2.3.2]
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:113)
...
The cause of this problem seems to be in the rebaseResponse method of org.apache.cxf.ws.addressing.ContextUtils, where the destination endpoint is determined in the following code:
421 Destination destination = createDecoupledDestination( 422 exchange, reference); 423 exchange.setDestination(destination);
As this reference parameter could become null, it needs a similar handling as in the code a few lines above:
388 reference == null
389 ? ContextUtils.getNoneEndpointReference()
390 : reference
Alternatively, the reference variable can be set to ContextUtils.getNoneEndpointReference() at the beginning of this rebaseResponse method to prevent this problem.
This problem does not occur in 2.2.x because this second use/reference of the referece variable is only present in 2.3.x.
I believe this change will solve this issue.
Regards, aki