[
https://issues.apache.org/jira/browse/CXF-8726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17563538#comment-17563538
]
Andriy Redko edited comment on CXF-8726 at 7/7/22 2:16 AM:
-----------------------------------------------------------
[~kwin] I was trying to reproduce the issue with `ResponseExceptionMapper` +
`Response::readEntity(Class<?>)` but I don't observe the same sequence: at
least for me the `ResponseExceptionMapper` is called before
`FailoverTargetSelector::complete()`, entity is never read as `null`. Would you
mind to provide reproducible test case for it? Thank you.
was (Author: reta):
[~kwin] I was trying to reproduce the issue with {{ResponseExceptionMapper +
Response::readEntity(Class<?>) but I don't observer the same sequence: at least
for me the }}{{ResponseExceptionMapper is called before
}}FailoverTargetSelector::complete(), entity is never read as `null`. Would you
mind to provide reproducible test case for it? Thank you.
> org.apache.cxf.jaxrs.client.ResponseExceptionMapper cannot evaluate response
> body in case of retries and org.apache.cxf.transport.service_not_available
> being true
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CXF-8726
> URL: https://issues.apache.org/jira/browse/CXF-8726
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 3.5.2
> Reporter: Konrad Windszus
> Priority: Major
>
> I have registered a custom
> {{org.apache.cxf.jaxrs.client.ResponseExceptionMapper}}. In case the request
> is retried (in my case via a {{org.apache.cxf.clustering.FailoverFeature}}
> leveraging a {{RetryStrategy}}), the custom response exception mapper gets
> {{null}} as return value for {{response.readEntity(Class)}} in its
> {{fromResponse(Response response}} method as it seems this one can not/no
> longer access the response body.
> IMHO javax.ws.rs.core.Response.readEntity(...) must never return null but
> rather throw an exception (compare with its javadoc at
> https://docs.oracle.com/javaee/7/api/javax/ws/rs/core/Response.html#readEntity-java.lang.Class-).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)