Hi - can you try CXF 2.7.9 ? Sergey On 05/02/14 11:57, Rakesh R wrote:
Hi,I think I found the cause: We had defined following three exceptions with the error codes: - IllegalArgumentException - err code: Response.Status.NOT_FOUND - IllegalStateException - err code: Response.Status.CONFLICT - InternalServerException - err code : Response.Status.INTERNAL_SERVER_ERROR IllegalArgumentException & IllegalStateException are not throwing back to the client and it is going to multiple retries. But I could see InternalServerException is getting called and propagating the exception to my client. Now I have one question: Is there any behavioral change in the error codes and building the response messages logic. Thanks in advance for any help. -Rakesh From: Rakesh R Sent: 05 February 2014 14:36 To: '[email protected]' Cc: gopinathan a Subject: ExceptionMapper is not working after upgrading to 2.7.8 from 2.5.0 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
-- Sergey Beryozkin Talend Community Coders http://coders.talend.com/ Blog: http://sberyozkin.blogspot.com
