ESB 2.1 Fault Handling Bug
5/25/2012 8:41:01 AM
User(s) can reproduce this bug
We have upgraded from ESB 2.0 to ESB 2.1 and found a bug in the ESB Exception handling mechanism. We trap errors in our orchestration and create & send an ESB fault as per the documentation:
ErrorMessage = Microsoft.Practices.ESB.ExceptionHandling.ExceptionMgmt.CreateFaultMessage();
The orchestration then sends the fault. However if the error message is > 256 characters a BizTalk error is generated in the ALL.Exceptions send handler:
A message sent to adapter "SQL" on send port "ALL.Exceptions" with URI "SQL://mydb/EsbExceptionDb/" is suspended.
Error details: There was a failure executing the send pipeline: "Microsoft.Practices.ESB.ExceptionHandling.Pipelines.ESBFaultProcessor, Microsoft.Practices.ESB.ExceptionHandling.Pipelines, Version=22.214.171.124, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "ESB Exception Encoder" Send Port: "ALL.Exceptions" URI: "SQL://mydb/EsbExceptionDb/" Reason: The property "Description" has a value with length greater than 256 characters.
It seems that for some reason, when fault messages are generated by an orchestration that the ESB is trying to promote the "Description" and FaultDescription fields. Note that we do not set the Description field - it is set by the ESB toolkit when creating the error message. Also, faults that occur directly on a messaging port do not result in these fields being promoted.
I have checked on our ESB 2.0 and this issue does not arise, presumably because these fields are not being promoted.
The net result of this error is that the error message we want to report gets suspended, so the support team never sees the error.
BizTalk 2010 Beta
Create an Orchestration. Use a scope and exception handler. Within the exception handler capture the fault and send to the ESB fault handler via the message box as per ESB documentation & above. e.g.
FaultMessage = Microsoft.Practices.ESB.ExceptionHandling.ExceptionMgmt.CreateFaultMessage();
FaultMessage.FailureCategory = "Error";
FaultMessage.FaultCode = "1";
FaultMessage.FaultDescription = ex.Message
FaultMessage.FaultSeverity = Microsoft.Practices.ESB.ExceptionHandling.FaultSeverity.Critical;
// Add original request
In the main body of the scope throw an exception with a message > 256 characters long. Now invoke the orchestration.
to post a comment.
Please enter a comment.
to post a workaround.
Please enter a workaround.
© 2013 Microsoft