Author |
Message
|
WBIMaestro |
Posted: Mon Aug 06, 2012 5:14 am Post subject: some BIP exception codes dont have text associated with them |
|
|
Acolyte
Joined: 18 Feb 2005 Posts: 53
|
Hi,
While testing one of our message flows, noticed that some of the Exceptions dont have a text message associated with them. for e.g BIP 3314 shows up in the trace without text. if i insert these into a db, it shows up as just a BIP code without any text. other exceptions, like XML parsing errors, do seem to have text associated with them. To illustrate :
Quote: |
(0x03000000:NameValue):Label =
'TS_BATCH_COMMON_FLOW.File Output' (CHARACTER)
(0x03000000:NameValue):Catalog = 'BIPmsgs'
(CHARACTER)
(0x03000000:NameValue):Severity = 3 (INTEGER)
(0x03000000:NameValue):Number = 2230 (INTEGER)
(0x03000000:NameValue):Text = 'Caught
exception and rethrowing' (CHARACTER)
(0x01000000:Name ):RecoverableException = (
(0x03000000:NameValue):File = 'AbstractFileOutputNode.
java' (CHARACTER)
(0x03000000:NameValue):Line = 686 (INTEGER)
(0x03000000:NameValue):Function = 'locateOutputFile'
(CHARACTER)
(0x03000000:NameValue):Type = '' (CHARACTER)
(0x03000000:NameValue):Name = '' (CHARACTER)
(0x03000000:NameValue):Label = '' (CHARACTER)
(0x03000000:NameValue):Catalog = 'BIPmsgs' (CHARACTER)
(0x03000000:NameValue):Severity = 0 (INTEGER)
(0x03000000:NameValue):Number = 3314 (INTEGER)
(0x03000000:NameValue):Text = '' (CHARACTER)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 5 (INTEGER)
(0x03000000:NameValue):Text = 'File Output' (CHARACTER)
)
I want to know why the Text is empty for BIP 3314:
(0x03000000:NameValue):Number = 3314 (INTEGER)
(0x03000000:NameValue):Text = '' (CHARACTER)
|
any ideas? |
|
Back to top |
|
 |
lancelotlinc |
Posted: Mon Aug 06, 2012 6:16 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
I saw a BIP message once that said
Code: |
(0x03000000:NameValue):Text = 'Eat at Joe's' (CHARACTER) |
Then I heard:
Quote: |
Beep, beep! Ptchew..... |
Not all exception list entries will have a text message associated with them. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
WBIMaestro |
Posted: Mon Aug 06, 2012 6:41 am Post subject: |
|
|
Acolyte
Joined: 18 Feb 2005 Posts: 53
|
funny, that same exceptionlist even had something like :
Quote: |
(0x03000000:NameValue):Text = ''Punk has a Bad Attitude(CHARACTER)
|
I would think thats bad design for ibm to be putting out exceptionlists without enough info while googling the same BIP code gives one accurate info in the diagnostics messages pdf. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Aug 06, 2012 7:19 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
So that Text field is for the bip itself and not for any of the inserts in the bip.
That bip in particular has three inserts, and is extremely clear on what the issue is and the inserts are extremely clear on what each one is and should be.
So I wouldn't really expect there to be a need for any higher level explanatory text that clarified the meaning of this particular instance of the BIP (since this bip applies in exactly one case and has no set of alternate meanings or causes) so I can see the programmer who wrote the code that logs this BIP leaving out that part of the function call, and then that same lack of parameter in that position passing code review as being unnecessary.
Also this BIP is a warning so there could very well be additional messages that occur at the same time that, again, provide additional explanatory meaning with it needing to be put into flat text in the error message. |
|
Back to top |
|
 |
WBIMaestro |
Posted: Mon Aug 06, 2012 2:05 pm Post subject: |
|
|
Acolyte
Joined: 18 Feb 2005 Posts: 53
|
yeah, if one takes the troule to correlate the inserts or looks for the BIP message explanation in the broker diagnostic messages pdf, its easy enough. just throws one off, if its an automated database insertion code thats looking for the BIP code and its text explanatio to log into a databse. probably makes more sense to just log the whole exception tree to a db then... |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Aug 07, 2012 5:04 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
WBIMaestro wrote: |
yeah, if one takes the troule to correlate the inserts or looks for the BIP message explanation in the broker diagnostic messages pdf, its easy enough. just throws one off, if its an automated database insertion code thats looking for the BIP code and its text explanatio to log into a databse. probably makes more sense to just log the whole exception tree to a db then... |
The exception tree is intended to be formatted by something like the ESQL Log statement. It doesn't help a lot in this scenario, because you can't access the output of anything that does this kind of formatting of the Exception tree from within broker itself.
But yes, generally, you really need to store the entire exception list tree.
It's easier than rewriting the error formatting processes to make use of the bipmsgs file to translate the exception tree. |
|
Back to top |
|
 |
AndreasMartens |
Posted: Fri Aug 10, 2012 5:45 am Post subject: It's there for debugging |
|
|
 Acolyte
Joined: 30 Jan 2006 Posts: 65 Location: Hursley, UK
|
Hi,
The first insert of an exception, the Trace Text, is there for service purposes to differentiate between different instances of the exception being thrown. Since it's hard-coded in source code, it is not translateable and hence not part of the actual error text. It can occasionally give you a pretty decent clue as to what went wrong, but for the full text you should always look it up in the manual.
Why don't we extract the full text and include it in the exceptionlist I hear you say? Because most uses of the exceptionlist are for machine-processing and don't need the text, and extracting the text would take extra time, reducing the performance of your flow.
thanks,
Andreas |
|
Back to top |
|
 |
Rookwood |
Posted: Mon Sep 15, 2014 8:39 am Post subject: Accessing message catalog text |
|
|
Novice
Joined: 26 Aug 2004 Posts: 13
|
I take the point about performance and not always providing the message catalog text in each and every instance.
However, surely there is a case for an ESQL function that will fetch the BIP text given the Catalog name and Message ID so that users writing the own ExceptionList handler code can access the proper text and substitute the insert values as and when required. _________________ GS |
|
Back to top |
|
 |
AndreasMartens |
Posted: Tue Sep 16, 2014 12:13 am Post subject: Excellent suggestion |
|
|
 Acolyte
Joined: 30 Jan 2006 Posts: 65 Location: Hursley, UK
|
|
Back to top |
|
 |
kimbert |
Posted: Tue Sep 16, 2014 12:41 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
...and not just for ESQL, btw. It would probably be useful to be able to do the same thing in Java or in a Mapping node ( although the latter could call out to the Java method if it was a static method ). _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
rekarm01 |
Posted: Tue Sep 16, 2014 4:37 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
kimbert wrote: |
...and not just for ESQL, btw. It would probably be useful to be able to do the same thing in Java or in a Mapping node ( although the latter could call out to the Java method if it was a static method ). |
The Java MbException class has the getMessage() and getLocalizedMessage() methods, to return the full error, although they are not static methods.
The .NET API also has the NBException.FormattedMessage method.
The C Common API does not have an equivalent function. |
|
Back to top |
|
 |
Rookwood |
Posted: Tue Sep 16, 2014 5:45 am Post subject: Re: Excellent suggestion |
|
|
Novice
Joined: 26 Aug 2004 Posts: 13
|
Defeated in the attempt by :
Internal Server Error - Read
The server encountered an internal error or misconfiguration and was unable to complete your request.
Reference #3.728377cc.1410874996.34a306f _________________ GS |
|
Back to top |
|
 |
|