Bug 820031 - Exception handling after SyncServiceInvoker fails
Exception handling after SyncServiceInvoker fails
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBossESB (Show other bugs)
5.3.0 GA
Unspecified Unspecified
high Severity unspecified
: ER1
: 5.3.1
Assigned To: Jason Shepherd
Robert Balent
:
Depends On:
Blocks: 852809 881857 848807
  Show dependency treegraph
 
Reported: 2012-05-08 20:12 EDT by Jason Shepherd
Modified: 2014-01-12 19:20 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Exception handling issues can arise after the SyncServiceInvoker fails. If an exception is thrown after the SyncServiceInvoker call, the error is not sent to the client. This can be resolved by setting a "FaultTo" EPR in a custom composer-class set on the service's FS-Provider.
Story Points: ---
Clone Of:
: 852809 881857 (view as bug list)
Environment:
Last Closed: 2012-11-29 12:17:01 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
User's example. (6.21 KB, application/x-zip-compressed)
2012-05-11 09:22 EDT, Rick Wagner
no flags Details
Suggested fix for Branch JBESB_4_11_CP (1.09 KB, patch)
2012-08-28 17:59 EDT, Jason Shepherd
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBESB-3796 Major Resolved Exception handling after SyncServiceInvoker fails 2014-01-30 05:28:59 EST

  None (edit)
Description Jason Shepherd 2012-05-08 20:12:09 EDT
Description of problem:

I have an EBWS based service which is using the SyncServiceInvoker to call a second service. This all works fine but if I throw an exception after the SyncServiceInvoker call the exception is not propagated to the client as a soap fault.
However if I remove the invocation of the SyncServiceInvoker and throw an exception, a soap fault is sent to the client.
I have attached a test project which demonstrates this.

To see the fault just comment out the SyncServiceInvoker call.


Version-Release number of selected component (if applicable):
4.10

How reproducible:
Use attached example project

Steps to Reproduce:
1. Deploy the attached example project to SOA Platform 5.2.0
2. Use any SOAP Client to send a WS request to the ESB.
3. Observe that the returned response is not a SOAP Fault
Comment 1 Rick Wagner 2012-05-11 09:22:34 EDT
Created attachment 583845 [details]
User's example.
Comment 2 Rick Wagner 2012-05-11 11:37:51 EDT
The attached reproducer shows that the caller might or might not see a fault depending on whether or not ServiceInvoker is used in the Action chain.

On the Support case, Jason has suggested this might be related to https://issues.jboss.org/browse/JBESB-3772.

Could we please take a look at this for SOA-P 5.3?
Comment 3 Jason Shepherd 2012-05-15 20:29:58 EDT
The customer tried the suggestion on issue, JBESB-3772. And found it fixed this problem. 

We suggest the change implementer try suggestions there as a starting point.
Comment 4 Rick Wagner 2012-05-22 08:27:03 EDT
GSS bumping from 'medium' to 'high'.  The customer is expressing interest in the issue, we would really like this one for 5.3.

Thanks,

Rick
Comment 5 Rick Wagner 2012-06-06 09:03:50 EDT
Not accepted as a blocker for 5.3, but we probably should re-visit this issue later.
Comment 6 Suz 2012-06-12 01:00:36 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Exception handling issues can arise after the SyncServiceInvoker fails. If an exception is thrown after the SyncServiceInvoker call, the error is not sent to the client. This can be resolved by setting a "FaultTo" EPR in a custom composer-class set on the service's FS-Provider.
Comment 7 Jason Shepherd 2012-08-12 18:50:35 EDT
I confirmed this issue still exists on the 5.3 branch. Could we please have this addressed in the next roll-up patch?
Comment 8 JBoss JIRA Server 2012-08-28 17:57:14 EDT
Jason Shepherd <jshepherd@redhat.com> made a comment on jira JBESB-3796

Suggested fix to be implemented on 4.11_CP branch
Comment 9 Jason Shepherd 2012-08-28 17:59:26 EDT
Created attachment 607702 [details]
Suggested fix for Branch JBESB_4_11_CP

Pending QA Approval
Comment 10 JBoss JIRA Server 2012-09-21 06:57:45 EDT
Sato Tadayoshi <tadayosi@gmail.com> made a comment on jira JBESB-3796

I find that rather the root cause should be located in ActionProcessingPipeline. I understand that the core philosophy of ActionProcessingPipeline is use the ReplyTo/FaultTo of the original request message header when it returns the normal response message or the fault message regardless of however these headers are changed during the action processing. At the innermost processPipeline(Message) method, the call info of the original request message is surely cached to 'callDetails' variable, and this cache is consistently refered to for determining the FaultTo EPR in the faultTo method when an exception occurs while processing actions. However, what's not consistent is when the error message is created by invoking Factory.createErrorMessage(...) method, which unfortunatelly refers to the original request message itself instead of the callDetails cache. To make things worse, Factory.createErrorMessage(...) returns the input message rather than a newly created error message if the input message doesn't have ReplyTo/FaultTo in its header, which is the case of this issue. That's why an ESB service doesn't return a SOAP fault but the normal result of SyncServiceInvoker to the client.

Considering that the problem is in this inconsistency of ActionProcessingPipeline and the same issue can occur with any actions which manipulates the request message header to null, I think the correct fix to the issue should be modifying ActionProcessingPipeline and Factory.createErrorMessage(...).
Comment 11 JBoss JIRA Server 2012-10-12 05:04:31 EDT
Tadayoshi Sato <tadayosi@gmail.com> updated the status of jira JBESB-3796 to Resolved

Note You need to log in before you can comment on or make changes to this bug.