private void checkSuccess ( Message response ) throws JdbcServerException { OperationResult operationResult = null ; if ( response instanceof JdbcMessage || response . getPayload ( ) instanceof OperationResult ) { operationResult = response . getPayload ( OperationResult . class ) ; } else if ( response . getPayload ( ) != null && StringUtils . hasText ( response . getPayload ( String . class ) ) ) { operationResult = ( OperationResult ) endpointConfiguration . getMarshaller ( ) . unmarshal ( new StringSource ( response . getPayload ( String . class ) ) ) ; } if ( ! success ( response , operationResult ) ) { throw new JdbcServerException ( getExceptionMessage ( response , operationResult ) ) ; } }
Check that response is not having an exception message .