[
https://issues.apache.org/jira/browse/CXF-3349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Kulp reassigned CXF-3349:
--------------------------------
Assignee: Daniel Kulp
> NPE may be thrown in WS-RM scenarios at the server side when rebasing the
> response
> ----------------------------------------------------------------------------------
>
> Key: CXF-3349
> URL: https://issues.apache.org/jira/browse/CXF-3349
> Project: CXF
> Issue Type: Bug
> Components: WS-* Components
> Affects Versions: 2.3.2
> Reporter: Aki Yoshida
> Assignee: Daniel Kulp
> Fix For: 2.4, 2.3.3
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Some WS-RM scenarios may sometimes result in the following exception at the
> provider/server side under the piggyback mode..
> {quote}
> 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)
>
> ...
> {quote}
> 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:
> {code}
> 421 Destination destination = createDecoupledDestination(
> 422 exchange, reference);
> 423 exchange.setDestination(destination);
> {code}
> As this reference parameter could become null, it needs a similar handling as
> in the code a few lines above:
> {code}
> 388 reference ==
> null
> 389 ?
> ContextUtils.getNoneEndpointReference()
> 390 : reference
> {code}
> 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
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira