Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8726

org.apache.cxf.jaxrs.client.ResponseExceptionMapper cannot evaluate response body in case of retries and org.apache.cxf.transport.service_not_available being true

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.5.2
    • None
    • JAX-RS
    • None
    • Unknown

    Description

      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-).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kwin Konrad Windszus
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: