Author |
Message
|
yaemu |
Posted: Wed Oct 27, 2010 6:13 am Post subject: Failed to put message |
|
|
Novice
Joined: 27 Oct 2010 Posts: 17
|
Hi,
I am trying to use the MQRFH2 headers in my messages, My code on the Message Broker is as follows:
==============================================
CREATE COMPUTE MODULE TestMQRFH2_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
CALL CopyEntireMessage();
SET OutputRoot.MQMD.Format = MQFMT_RF_HEADER_2;
CREATE NEXTSIBLING OF OutputRoot.MQMD TYPE NameValue NAME 'MQRFH2' ;
SET OutputRoot.MQRFH2.StrucId= MQRFH_STRUC_ID;
SET OutputRoot.MQRFH2.Version = MQRFH_VERSION_2;
SET OutputRoot.MQRFH2.Struclength = MQRFH_STRUC_LENGTH_FIXED_2;
SET OutputRoot.MQRFH2.Encoding = MQENC_NATIVE;
SET OutputRoot.MQRFH2.CodedCharSetId = MQCCSI_INHERIT;
SET OutputRoot.MQRFH2.Flags = MQRFH_NONE;
SET OutputRoot.MQRFH2.NameValueCCSID = 1208;
RETURN TRUE;
END;
==================================
the header created in the message but when I try to put the message on the queue using MQOutput node an exception thrown :
MessageException
File:CHARACTER:F:\build\S610_P\src\DataFlowEngine\ImbMqOutputNode.cpp
Line:INTEGER:2337
Function:CHARACTER:ImbMqOutputNode::putMessage
Type:CHARACTER:ComIbmMQOutputNode
Name:CHARACTER:TestMQRFH2#FCMComposite_1_2
Label:CHARACTER:TestMQRFH2.MQOutput
Catalog:CHARACTER:BIPv610
Severity:INTEGER:3
Number:INTEGER:2667
Text:CHARACTER:Failed to put message
Please Help
Thnx |
|
Back to top |
|
 |
Vitor |
Posted: Wed Oct 27, 2010 6:33 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Why are you calling CopyMessageHeaders and CopyEntireMessage?
What does the rest of the OutputRoot look like, i.e. after the MQRFH2?
Does it match the format specified in the RFH2? If so, how as you've not specified any format?
What do the other exceptions say?
What does the user trace show? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
yaemu |
Posted: Wed Oct 27, 2010 6:45 am Post subject: |
|
|
Novice
Joined: 27 Oct 2010 Posts: 17
|
1. CopyMessageHeaders and CopyEntireMessage do nothing but copying the input root to the output root, I do not add any code to their default code.
2. I use XMLNSC parser to read the rest of Output root and the data is:
<AccountMovementsRequest>
<FunctionId>120</FunctionId>
<ReferenceId>12384509280609161232</ReferenceId>
<ChannelCode>09</ChannelCode>
<AccountNumber>XXXXXX</AccountNumber>
<DebitCardNumber>XXXXXX</DebitCardNumber>
</AccountMovementsRequest>
3. I put the format = 'MQSTR' but the same error |
|
Back to top |
|
 |
yaemu |
Posted: Wed Oct 27, 2010 6:48 am Post subject: |
|
|
Novice
Joined: 27 Oct 2010 Posts: 17
|
Kindly this is the MQRFH2 Header Created :
MQRFH2
StrucId:CHARACTER:RFH
Version:INTEGER:2
Struclength:INTEGER:36
Encoding:INTEGER:546
CodedCharSetId:INTEGER:-2
Format:CHARACTER:MQSTR
Flags:INTEGER:0
NameValueCCSID:INTEGER:1208
and this is the Full ExceptionList:
ExceptionList
RecoverableException
File:CHARACTER:F:\build\S610_P\src\DataFlowEngine\ImbDataFlowNode.cpp
Line:INTEGER:957
Function:CHARACTER:ImbDataFlowNode::createExceptionList
Type:CHARACTER:ComIbmMQInputNode
Name:CHARACTER:TestMQRFH2#FCMComposite_1_1
Label:CHARACTER:TestMQRFH2.MQInput
Catalog:CHARACTER:BIPv610
Severity:INTEGER:3
Number:INTEGER:2230
Text:CHARACTER:Node throwing exception
RecoverableException
File:CHARACTER:F:\build\S610_P\src\DataFlowEngine\ImbMqOutputNode.cpp
Line:INTEGER:911
Function:CHARACTER:ImbMqOutputNode::evaluate
Type:CHARACTER:ComIbmMQOutputNode
Name:CHARACTER:TestMQRFH2#FCMComposite_1_2
Label:CHARACTER:TestMQRFH2.MQOutput
Catalog:CHARACTER:BIPv610
Severity:INTEGER:3
Number:INTEGER:2230
Text:CHARACTER:Caught exception and rethrowing
MessageException
File:CHARACTER:F:\build\S610_P\src\DataFlowEngine\ImbMqOutputNode.cpp
Line:INTEGER:2337
Function:CHARACTER:ImbMqOutputNode::putMessage
Type:CHARACTER:ComIbmMQOutputNode
Name:CHARACTER:TestMQRFH2#FCMComposite_1_2
Label:CHARACTER:TestMQRFH2.MQOutput
Catalog:CHARACTER:BIPv610
Severity:INTEGER:3
Number:INTEGER:2667
Text:CHARACTER:Failed to put message
Insert
Type:INTEGER:2
Text:CHARACTER:-1
Insert
Type:INTEGER:5
Text:CHARACTER:MQW102
Insert
Type:INTEGER:2
Text:CHARACTER:2142
Insert
Type:INTEGER:5
Text:CHARACTER:
Insert
Type:INTEGER:5
Text:CHARACTER:
Insert
Type:INTEGER:5
Text:CHARACTER:OUT |
|
Back to top |
|
 |
Vitor |
Posted: Wed Oct 27, 2010 6:50 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
yaemu wrote: |
1. CopyMessageHeaders and CopyEntireMessage do nothing but copying the input root to the output root, I do not add any code to their default code. |
Oddly enough I am familiar with what they do. My question is why are you calling both of them?
yaemu wrote: |
2. I use XMLNSC parser to read the rest of Output root and the data is:
<AccountMovementsRequest>
<FunctionId>120</FunctionId>
<ReferenceId>12384509280609161232</ReferenceId>
<ChannelCode>09</ChannelCode>
<AccountNumber>XXXXXX</AccountNumber>
<DebitCardNumber>XXXXXX</DebitCardNumber>
</AccountMovementsRequest> |
Fair enough.
yaemu wrote: |
3. I put the format = 'MQSTR' but the same error |
In the MQMD or the RFH2? A follow up question is why are you adding an RFH2 at all; there seems no value to it (i.e. no additional information) from the code you've posted.
I repeat my other questions regarding the other errors and the user trace. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
yaemu |
Posted: Wed Oct 27, 2010 7:04 am Post subject: |
|
|
Novice
Joined: 27 Oct 2010 Posts: 17
|
The code I sent on the board is a sample flow I am working on it just to test the use of MQRFH2 so you can find the I left the CopyMessageHeaders and CopyEntireMessage, because I do not care about them I need to focus on the MQRFH2 so I left them.
Regarding the Format value:
MQMD.Format = MQFMT_RF_HEADER_2
MQRFH2.Format = 'MQSTR'
Regarding why I need to use the MQRFH2 header:
I need to add some parameters to the Header of message to save them,
ie. I need to set the FunctionId and ChannelCode from the message in the MQRFH2.usr and keep them in this path because I will use these parameters later.
Finally what do you mean by Other errors and user trace: If I understand you correct, there are no other errors and I do not use any trace node because this is a sample flow just for test
thnx |
|
Back to top |
|
 |
Vitor |
Posted: Wed Oct 27, 2010 7:11 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
yaemu wrote: |
I do not care about them I need to focus on the MQRFH2 so I left them. |
Not caring about things that don't directly affect what you're working on is at best sloppy and at worst will bite you later. Select the relevant one and use it.
yaemu wrote: |
Regarding the Format value:
MQMD.Format = MQFMT_RF_HEADER_2
MQRFH2.Format = 'MQSTR' |
The 2nd value is wrong. If you examine MQFMT_STRING (which you should be using for consistency at least) that's not what it contains.
yaemu wrote: |
Regarding why I need to use the MQRFH2 header:
I need to add some parameters to the Header of message to save them,
ie. I need to set the FunctionId and ChannelCode from the message in the MQRFH2.usr and keep them in this path because I will use these parameters later. |
Fair enough.
yaemu wrote: |
I do not use any trace node because this is a sample flow just for test |
I didn't say trace node, I said user trace. Taking one should be step one of your problem resolution strategy. If you decide to augment it with the addition of trace nodes to the flow this might help; I agree that in this case it's unlikely to add much.
But might add something.
But a user trace will tell you a lot. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
joebuckeye |
Posted: Wed Oct 27, 2010 9:19 am Post subject: |
|
|
 Partisan
Joined: 24 Aug 2007 Posts: 365 Location: Columbus, OH
|
Quote: |
I do not use any trace node because this is a sample flow just for test |
Test is the perfect time to use trace nodes. Their output can provide a wealth of information about the message you are working with.
And you might even learn something new about how broker lays out messages that will come in handy in a later project. |
|
Back to top |
|
 |
rekarm01 |
Posted: Wed Oct 27, 2010 9:50 am Post subject: Re: Failed to put message |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
yaemu wrote: |
Code: |
Catalog:CHARACTER:BIPv610
Severity:INTEGER:3
Number:INTEGER:2667
Text:CHARACTER:Failed to put message
Insert
Type:INTEGER:2
Text:CHARACTER:-1
Insert
Type:INTEGER:5
Text:CHARACTER:MQW102
Insert
Type:INTEGER:2
Text:CHARACTER:2142 |
|
This error message is easier to read in a usertrace. Check the documentation for MQRC 2142.
yaemu wrote: |
Code: |
SET OutputRoot.MQRFH2.Struclength = MQRFH_STRUC_LENGTH_FIXED_2; |
|
Struclength? |
|
Back to top |
|
 |
yaemu |
Posted: Wed Oct 27, 2010 11:18 am Post subject: |
|
|
Novice
Joined: 27 Oct 2010 Posts: 17
|
rekarm01,
Thanks for your help, I updated the code to be as follow:
SET OutputRoot.MQRFH2.StrucId= MQRFH_STRUC_ID;
SET OutputRoot.MQRFH2.Version = MQRFH_VERSION_2;
-- I deleted the Struclength setting line
SET OutputRoot.MQRFH2.Encoding = MQENC_NATIVE;
SET OutputRoot.MQRFH2.CodedCharSetId = 437;
SET OutputRoot.MQRFH2.Format = MQFMT_STRING;
SET OutputRoot.MQRFH2.Flags = MQRFH_NONE;
SET OutputRoot.MQRFH2.NameValueCCSID = 1208;
But I have no news, the same error,
and I was trying to start the user trace as everybody advice me using the toolkit:
1. In the Navigator view, expand the Brokers folder and right-click the execution group or message flow with which you want to work.
2. Click Service Trace > Normal or Service Trace > Debug to select the level of service trace that you require.
but I do not know where to find the trace file,
thnx[/b] |
|
Back to top |
|
 |
Vitor |
Posted: Wed Oct 27, 2010 11:43 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
yaemu wrote: |
but I do not know where to find the trace file |
You could try looking in the InfoCenter. Along with everything else about broker, it describes the user trace in some detail. I found the section titled "Debugging with user trace" especially relevant to what you're trying to do; it even has step by step instructions to follow.
Happy reading.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
yaemu |
Posted: Wed Oct 27, 2010 12:27 pm Post subject: |
|
|
Novice
Joined: 27 Oct 2010 Posts: 17
|
finally the user trace:
2010-10-27 22:03:33.544067 5688 Error BIP2628E: Exception condition detected on input node 'TestMQRFH2.MQInput'.
The input node 'TestMQRFH2.MQInput' detected an error whilst processing a message. The message flow has been rolled-back and, if the message was being processed in a unit of work, it will remain on the input queue to be processed again. Following messages will indicate the cause of this exception.
Check the error messages which follow to determine why the exception was generated, and take action as described by those messages.
2010-10-27 22:03:33.544166 5688 RecoverableException BIP2230E: Error detected whilst processing a message in node 'TestMQRFH2.MQOutput'.
The message broker detected an error whilst processing a message in node 'TestMQRFH2.MQOutput'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.
2010-10-27 22:03:33.544204 5688 MessageException BIP2667E: An error occurred in node 'TestMQRFH2.MQOutput' writing message to queue ''OUT'' on queue manager ''''. State = '-1' ''MQW102'' '2142' ''''
An error occurred when a message flow node attempted to write a message to a queue. The reason code from the MQPUT is displayed as the 3rd (native error) state.
Check the WebSphere MQ completion and reason codes in the WebSphere MQ Application Programming Reference manual to establish the cause of the error, taking any appropriate action. It may be necessary to restart the message broker after you have performed this recovery action.
2010-10-27 22:03:34.545501 5688 Error BIP2648E: Message backed out to a queue; node 'TestMQRFH2.MQInput'.
Node 'TestMQRFH2.MQInput' has received a message which has previously been backed out one or more times because of a processing error in the main path of the message flow. The failure terminal is not attached, so the message broker is putting the message directly to the requeue or dead letter backout queue associated with this node. The MQMD 'backoutCount' of the message now equals the 'backoutThreshold' defined for the WebSphere MQ input queue.
Examine previous messages and the message flow to determine why the message is being backed out. Correct this situation if possible. Perform any local error recovery processing required.
2010-10-27 22:03:34.546512 5688 UserTrace BIP2638I: The MQ output node 'TestMQRFH2.MQInput' attempted to write a message to queue ''DLQ'' connected to queue manager ''WBRK61_DEFAULT_QUEUE_MANAGER''. The MQCC was '0' and the MQRC was '0'.
2010-10-27 22:03:34.546581 5688 UserTrace BIP2615I: The WebSphere MQ input node 'TestMQRFH2.MQInput' has backed out the message to the backout requeue or the dead letter queue.
Message backout processing has been invoked, and the message has either been backed out by being written to the backout requeue or dead letter queue, as determined by the WebSphere MQ queue manager and queue configuration.
No user action required. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Oct 27, 2010 12:35 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
yaemu wrote: |
finally the user trace: |
I think you might find the section above that more useful. And you could possibly consider a trace node to add additional clarity.
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Oct 27, 2010 12:40 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
yaemu wrote: |
rekarm01,
Thanks for your help, I updated the code to be as follow:
SET OutputRoot.MQRFH2.StrucId= MQRFH_STRUC_ID;
SET OutputRoot.MQRFH2.Version = MQRFH_VERSION_2;
-- I deleted the Struclength setting line
SET OutputRoot.MQRFH2.Encoding = MQENC_NATIVE;
SET OutputRoot.MQRFH2.CodedCharSetId = 437;
SET OutputRoot.MQRFH2.Format = MQFMT_STRING;
SET OutputRoot.MQRFH2.Flags = MQRFH_NONE;
SET OutputRoot.MQRFH2.NameValueCCSID = 1208;
But I have no news, the same error,
and I was trying to start the user trace as everybody advice me using the toolkit:
1. In the Navigator view, expand the Brokers folder and right-click the execution group or message flow with which you want to work.
2. Click Service Trace > Normal or Service Trace > Debug to select the level of service trace that you require.
but I do not know where to find the trace file,
thnx[/b] |
Try
Code: |
SET OutputRoot.MQRFH2.(MQRFH2.Field)StrucId= MQRFH_STRUC_ID;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Version = MQRFH_VERSION_2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Encoding = MQENC_NATIVE;
SET OutputRoot.MQRFH2.(MQRFH2.Field)CodedCharSetId = 437;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format = MQFMT_STRING;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Flags = MQRFH_NONE;
SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID = 1208;
|
Have fun
Have fun  _________________ MQ & Broker admin
Last edited by fjb_saper on Wed Oct 27, 2010 12:47 pm; edited 1 time in total |
|
Back to top |
|
 |
yaemu |
Posted: Wed Oct 27, 2010 12:41 pm Post subject: |
|
|
Novice
Joined: 27 Oct 2010 Posts: 17
|
Explanation
An MQPUT or MQPUT1 call was issued, but the message data contains an MQ header structure that is not valid. Possible errors include the following:
* The StrucId field is not valid.
* The Version field is not valid.
* The StrucLength field specifies a value that is too small.
* The CodedCharSetId field is zero, or a negative value that is not valid.
* The BufferLength parameter of the call has a value that is too small to accommodate the structure (the structure extends beyond the end of the message).
and this explanation redirect us back to the last update I did on my code in the section of MQRFH2 setting values as follows:
SET OutputRoot.MQRFH2.StrucId= MQRFH_STRUC_ID;
SET OutputRoot.MQRFH2.Version = MQRFH_VERSION_2;
-- I deleted the setting of Struclength
SET OutputRoot.MQRFH2.Encoding = MQENC_NATIVE;
SET OutputRoot.MQRFH2.CodedCharSetId = 437;-- this is the same value of the MQMD.CodedCharSetId
SET OutputRoot.MQRFH2.Format = MQFMT_STRING;
SET OutputRoot.MQRFH2.Flags = MQRFH_NONE;
SET OutputRoot.MQRFH2.NameValueCCSID = 1208;
and this code still give me the same error
and The generated MQRFH2 Headers are:
MQRFH2
StrucId:CHARACTER:RFH
Version:INTEGER:2
Struclength:INTEGER:36
Encoding:INTEGER:546
CodedCharSetId:INTEGER:-2
Format:CHARACTER:MQSTR
Flags:INTEGER:0
NameValueCCSID:INTEGER:1208 |
|
Back to top |
|
 |
|