ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to track Parser Exception

Post new topic  Reply to topic
 How to track Parser Exception « View previous topic :: View next topic » 
Author Message
rajparekh08
PostPosted: Mon Nov 09, 2009 4:38 am    Post subject: How to track Parser Exception Reply with quote

Acolyte

Joined: 21 Sep 2009
Posts: 58
Location: India- Bagalore

Hi,
In my trace, I get the followin:

The message broker detected an error whilst processing a message in node 'XXXX.HTTP Request from Service Consumer SOAP'.
The message has been augmented with an exception list and has been propagated to
the node's catch terminal for further processing.See the following messages for details of the error.
2009-11-09 05:13:06.385543
8984 RecoverableException BIP2230E: Error detected whilst processing a message in node 'XXXX.ResetContentDescriptor1' The message broker detected an error whilst processing a message in node 'XXXX.ResetContentDescriptor1'. An exception has been thrown to cut short the processing of the message.See the following messages for details of the error.
2009-11-09 05:13:06.385560 8984 ParserException BIP5285E: Message Translation Interface Parsing Errors have occurred:
Message Set Name : ''WebserviceMessageSet'' Message Set Level : '1'
Message Format : ''XML1'' Message Type Path : ''Envelope''
Review further error messages for an indication to the cause of the errors.
2009-11-09 05:13:06.385579 8984 ParserException BIP5367E: Message Validation failure. Invalid value for element
'http://www.XXXX.com/schemas/XXXX/XXXXX:CardNbr'. The value '0' is not in the list of allowed values.The value for the element in the message Modify the message set or messageflow and redeploy to the broker or modify the input message and resubmit to the broker.


Basically, the value for the tag "cardnmr" is absent.
So a parser error is thrown.

I use the following in my code to catch the exception and send it to the requester:
DECLARE start REFERENCE TO InputExceptionList.ParserException;
SET messageText = start.Insert.Text;
set messageText2 = start.Insert.Text;
set OutputRoot.XML.Error.text[i] = messageText;

The o/p of above is :
<Error><text>Caught exception and rethrowing</text><text>ImbRecoverableException caught from worker-&gt;parse.</text><text>Field is not one of the allowed enumeration values</text></Error>


Well the requirement is to get the parser exception error which explictly tells that the cardnbr value is incorrect.
How to i look into the parserexception and pull out the error text
Help
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
smdavies99
PostPosted: Mon Nov 09, 2009 4:48 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Hint:

Wire up the Catch Terminal of your Input Node to a Trace node and get it to output ${ExceptionList}.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Nov 09, 2009 5:39 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Another hint: Using a Trace node is not the answer. smdavies99 is telling you how to *find* the answer.
Back to top
View user's profile Send private message
rajparekh08
PostPosted: Mon Nov 09, 2009 8:27 pm    Post subject: Reply with quote

Acolyte

Joined: 21 Sep 2009
Posts: 58
Location: India- Bagalore

kimbert wrote:
Another hint: Using a Trace node is not the answer. smdavies99 is telling you how to *find* the answer.



What if I want to do it without a Trace node?
Just peep into the exceptionlist and get the fault.
here, it is a parser exception, and all I want is the error,
say if a mandatory tag is missing, I want the parser exception,pointing out which tag is missing or so.. Cause the end users of this service, will have no idea how MQ/MB works.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
fjb_saper
PostPosted: Mon Nov 09, 2009 8:54 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Well the hint is still the same. You need not use the trace node.
You should however look at the last 3 text information on the bottom of the Exception tree?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Mon Nov 09, 2009 11:06 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

I suggested the use of a trace node so that you can see the exceptionlist in all it multilevel glory. A 'Transformation type' node placed after that would allow you to navigate the exceptionlist and extract the relevant info as suggested by fjb_saper.
This is how I learnt about using the information so generously provided in ExceptionLists. Maybe you can too?
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Tue Nov 10, 2009 12:47 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

This should help you understand the structure also:
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp?topic=/com.ibm.etools.mft.doc/ac00540_.htm

Theres also sample ESQL on how to process the tree and form a useful message. If you do a little searching im sure you'll find it.
Back to top
View user's profile Send private message
rajparekh08
PostPosted: Tue Nov 10, 2009 2:25 am    Post subject: Reply with quote

Acolyte

Joined: 21 Sep 2009
Posts: 58
Location: India- Bagalore

WMBDEV1 wrote:
This should help you understand the structure also:
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp?topic=/com.ibm.etools.mft.doc/ac00540_.htm

Theres also sample ESQL on how to process the tree and form a useful message. If you do a little searching im sure you'll find it.



Hi,
It is done, I pull out the exception using the ExceptionList.
That is i pull it out from the "Insert" child of the Recoverable Exception.
Now my next doubt is, Is it possible to check for the value in the incoming XML message in a message set?? Say I dont want the tag CardNbr to be empty. Is it possible??
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
WMBDEV1
PostPosted: Tue Nov 10, 2009 2:28 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

You should be able to do this using minimum length constraints, assuming you have validation enabled when parsing.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Nov 10, 2009 6:59 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

If you are validating an XML message, you should be using XMLNSC. Unless you're still on v6.0.
Back to top
View user's profile Send private message
rajparekh08
PostPosted: Mon Nov 16, 2009 9:58 pm    Post subject: Reply with quote

Acolyte

Joined: 21 Sep 2009
Posts: 58
Location: India- Bagalore

kimbert wrote:
If you are validating an XML message, you should be using XMLNSC. Unless you're still on v6.0.


Yeah, I am using v6.0. There is no way I can change this. It is at enterprise level.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to track Parser Exception
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.