Bug 871868 - Improve Error message management.
Summary: Improve Error message management.
Keywords:
Status: NEW
Alias: None
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBossESB
Version: 5.3.0 GA
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-31 15:20 UTC by Martin Weiler
Modified: 2021-10-15 11:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Enhancement
Embargoed:


Attachments (Terms of Use)

Description Martin Weiler 2012-10-31 15:20:06 UTC
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 15:33:56 UTC
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.