Hi,

We have implemented the failover feature and exception mappers using cxf 2.5.0 
and now we are trying to use the latest available version 2.7.8.
After upgrading to 2.7.8 my  exception mapper logic is not working fine. Based 
on the initial analysis I could see 'response.getEntity()' is returning null 
and causing the issue.
Can anyone help me to resolve this issue.

Following is my mapper implementation:

    RestExceptionResponseMapper implements ResponseExceptionMapper<Exception> {

       public Exception fromResponse(Response response) {
              // ....
              try {
                     inputStream = (InputStream) response.getEntity();
                     reader = new BufferedReader(new 
InputStreamReader(inputStream));
                     s = reader.readLine();
              } catch (IOException e) {
                     // ....
              } finally {
                     // ....
              }
      }
   }


Failover strategy implementation:
              <failover>
                     <strategy>
                            <type>multiAttemptSequencial</type>
                            <maxRetryAttempts>3</maxRetryAttempts>
                            <tryInfinitely>true</tryInfinitely>
                     </strategy>
              </failover>

              FailoverFeature feature = new FailoverFeature();
              FailoverStrategy failoverStrategy;
              try {
                     failoverStrategy = 
applicationContext.getBean(failoverStrategyType, FailoverStrategy.class);
              } catch (BeansException e) {
                     // .....
              }


Thanks,
Rakesh

Reply via email to