Bug 871868 - Improve Error message management.
Improve Error message management.
Status: NEW
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBossESB (Show other bugs)
5.3.0 GA
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: kconner
Depends On:
  Show dependency treegraph
Reported: 2012-10-31 11:20 EDT by Martin Weiler
Modified: 2012-11-07 10:34 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Enhancement
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Martin Weiler 2012-10-31 11:20:06 EDT
Description of problem:
By default when an error occurs during the execution of an ESB service, an error message is created with the fault inside and the ID of the initial message. Then this newly created message is forwarded to the Dead Letter Service (if nothing else specified) for its treatment. The problem is that the incoming error message is no longer containing all the initial ESB message variables needed to analyze the reason of the error.

I know that we should be able to retrieve the initial message (using the stored ID) if we had previously called the "persist" action to store the message into the DB.

Am I right so far ?

If it is right, I have two problems with that behavior:

1 We should add a specific “persist” action before every action of the ESB action pipeline as it is not done automatically. Doing so will make the service a lot less readable and complicated to write and maintain.

2) We are not sure that we will have the latest variables values in the retrieved inital message body as some of them may have been modified during the action itself causing the exception. Due to that, the content of the initial message will be less relevant for the error analysis.

That is why for our need we have patched the Factory.java within the jbossesb-rosetta.jar to add the follwing line:

--> errorMessage.getBody().merge(defaultError.getBody());
just before this original one:

--> errorMessage.getBody().add(Fault.THROWABLE_CONTENT, problem);

This will alow us to retrieve all the original message body for the error analysis.
Comment 1 Martin Weiler 2012-11-07 10:33:56 EST
Another use case where the current error message creation is causing issues:

We have a secured service defined.
When invoking the secured service without credentials, we receive the following exception:

org.jboss.soa.esb.services.security.SecurityServiceException: Service 'AuthServiceOk' has been configured for security but no AuthenticationRequest could be located in the Message Context. Cannot authenticate without an AuthenticationRequest.
        at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:551)
        at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:442)

This is fine. However our specified fault-to service is then invoked, but not with out original message.

How do we ensure when an authentication error occurs our original message is available to our fault-to service?

I do have the relates-to, but I no longer have the message instance. The client is remote, so cannot even get the client to persist and lookup using the relates-to message id.

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