|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
HexBinary in TDS (Data length error) |
« View previous topic :: View next topic » |
Author |
Message
|
mvs |
Posted: Wed Mar 30, 2011 9:11 am Post subject: HexBinary in TDS (Data length error) |
|
|
Voyager
Joined: 06 Jul 2007 Posts: 85
|
I have simple requirement. I need to send data to WTX node which contains like below
username|password|hostname|portnumber|filepath|filename#Data.
For this, I created the simple message set with TDS format.
Code: |
Message: Type
FileDetails File_Type
Header
FileData
ComplexTypes
Header_Type (all elements delimited with |)
username string
password string
hostname string
portnumber string
filepath string
filename string
ComplexType (all elements delimited with #)
File_Type
Header Header_Type
FileData HexBinary.
|
When form the message in compute node like below
Code: |
CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();
SET OutputRoot.Properties.MessageSet = 'A5N9EA0002001';
SET OutputRoot.Properties.MessageFormat = 'Text1';
SET OutputRoot.Properties.MessageType = 'File_Details';
SET OutputRoot.Properties.MessageDomain = 'MRM';
SET OutputRoot.MRM.Header.Username = 'mqsisit';
SET OutputRoot.MRM.Header.Password = 'xxxxxx';
SET OutputRoot.MRM.Header.Hostname = 'xxxxdevl';
SET OutputRoot.MRM.Header.Portnumber = '21';
SET OutputRoot.MRM.Header.FilePath = '/ftpdata/cms/input/transfer/receive/CASHPOOL/';
SET OutputRoot.MRM.Header.FileName = 'Test_broker.txt';
-- SET OutputRoot.MRM.DataLength = LENGTH(InputRoot.BLOB.BLOB);
SET OutputRoot.MRM.FileData = InputRoot.BLOB.BLOB;
|
I am getting the error
OutputRoot.Properties.MessageSet = 'A5N9EA0002001';'' at ('.TestFlow_HexBinary_Compute.Main', '6.3').
2011-03-30 12:46:25.240708 2619 UserTrace BIP2566I: Node 'TestFlow_HexBinary.Compute': Assigning value '''A5N9EA0002001''' to field / variable ''OutputRoot.Properties.MessageSet''.
2011-03-30 12:46:25.240724 2619 UserTrace BIP2537I: Node 'TestFlow_HexBinary.Compute': Executing statement ''SET OutputRoot.Properties.MessageFormat = 'Text1';'' at ('.TestFlow_HexBinary_Compute.Main', '7.3').
2011-03-30 12:46:25.240744 2619 UserTrace BIP2566I: Node 'TestFlow_HexBinary.Compute': Assigning value '''Text1''' to field / variable ''OutputRoot.Properties.MessageFormat''.
2011-03-30 12:46:25.240766 2619 UserTrace BIP2537I: Node 'TestFlow_HexBinary.Compute': Executing statement ''SET OutputRoot.Properties.MessageType = 'File_Details';'' at ('.TestFlow_HexBinary_Compute.Main', '8.3').
2011-03-30 12:46:25.240786 2619 UserTrace BIP2566I: Node 'TestFlow_HexBinary.Compute': Assigning value '''File_Details''' to field / variable ''OutputRoot.Properties.MessageType''.
2011-03-30 12:46:25.240800 2619 UserTrace BIP2537I: Node 'TestFlow_HexBinary.Compute': Executing statement ''SET OutputRoot.Properties.MessageDomain = 'MRM';'' at ('.TestFlow_HexBinary_Compute.Main', '9.3').
2011-03-30 12:46:25.240826 2619 UserTrace BIP2566I: Node 'TestFlow_HexBinary.Compute': Assigning value '''MRM''' to field / variable ''OutputRoot.Properties.MessageDomain''.
2011-03-30 12:46:25.240840 2619 UserTrace BIP2537I: Node 'TestFlow_HexBinary.Compute': Executing statement ''SET OutputRoot.MRM.Header.Username = 'mqsisit';'' at ('.TestFlow_HexBinary_Compute.Main', '11.3').
2011-03-30 12:46:25.240938 2619 UserTrace BIP2566I: Node 'TestFlow_HexBinary.Compute': Assigning value '''mqsisit''' to field / variable ''OutputRoot.MRM.Header.Username''.
2011-03-30 12:46:25.240956 2619 UserTrace BIP2537I: Node 'TestFlow_HexBinary.Compute': Executing statement ''SET OutputRoot.MRM.Header.Password = 'xxxxxx';'' at ('.TestFlow_HexBinary_Compute.Main', '12.3').
2011-03-30 12:46:25.240984 2619 UserTrace BIP2566I: Node 'TestFlow_HexBinary.Compute': Assigning value '''m1q2s3i4''' to field / variable ''OutputRoot.MRM.Header.Password''.
2011-03-30 12:46:25.241000 2619 UserTrace BIP2537I: Node 'TestFlow_HexBinary.Compute': Executing statement ''SET OutputRoot.MRM.Header.Hostname = 'xxxxdevl';'' at ('.TestFlow_HexBinary_Compute.Main', '13.3').
2011-03-30 12:46:25.241018 2619 UserTrace BIP2566I: Node 'TestFlow_HexBinary.Compute': Assigning value '''xxxxdevl''' to field / variable ''OutputRoot.MRM.Header.Hostname''.
2011-03-30 12:46:25.241034 2619 UserTrace BIP2537I: Node 'TestFlow_HexBinary.Compute': Executing statement ''SET OutputRoot.MRM.Header.Portnumber = '21';'' at ('.TestFlow_HexBinary_Compute.Main', '14.3').
2011-03-30 12:46:25.241052 2619 UserTrace BIP2566I: Node 'TestFlow_HexBinary.Compute': Assigning value '''21''' to field / variable ''OutputRoot.MRM.Header.Portnumber''.
2011-03-30 12:46:25.241068 2619 UserTrace BIP2537I: Node 'TestFlow_HexBinary.Compute': Executing statement ''SET OutputRoot.MRM.Header.FilePath = '/ftpdata/cms/input/transfer/receive/CASHPOOL/';'' at ('.TestFlow_HexBinary_Compute.Main', '15.3').
2011-03-30 12:46:25.241086 2619 UserTrace BIP2566I: Node 'TestFlow_HexBinary.Compute': Assigning value '''/ftpdata/cms/input/transfer/receive/CASHPOOL/''' to field / variable ''OutputRoot.MRM.Header.FilePath''.
2011-03-30 12:46:25.241102 2619 UserTrace BIP2537I: Node 'TestFlow_HexBinary.Compute': Executing statement ''SET OutputRoot.MRM.Header.FileName = 'Test_broker.txt';'' at ('.TestFlow_HexBinary_Compute.Main', '16.3').
2011-03-30 12:46:25.241130 2619 UserTrace BIP2566I: Node 'TestFlow_HexBinary.Compute': Assigning value '''Test_broker.txt''' to field / variable ''OutputRoot.MRM.Header.FileName''.
2011-03-30 12:46:25.241154 2619 UserTrace BIP2537I: Node 'TestFlow_HexBinary.Compute': Executing statement ''SET OutputRoot.MRM.FileData = InputRoot.BLOB.BLOB;'' at ('.TestFlow_HexBinary_Compute.Main', '18.3').
2011-03-30 12:46:25.241936 2619 UserTrace BIP2539I: Node 'TestFlow_HexBinary.Compute': Evaluating expression ''InputRoot.BLOB.BLOB'' at ('.TestFlow_HexBinary_Compute.Main', '18.36'). This resolved to ''InputRoot.BLOB.BLOB''. The result was ''ROW... Root Element Type=50331648 NameSpace='' Name='BLOB' Value=X'6d717369736974317c6d317132733369347c73666d7173696465766c327c32317c2f7661722f6462322f686f6d652f6d717369736974312f753030323735312f7c6d6f645754584654506f75747075742e747874235045524c202d2d202050726163746963616c2045787472616374696f6e20616e64205265706f7274204c616e67756167650d0a0d0a2e2028646f742920202d2d202020646f74206973206120636f6e636174656e6174696f6e206f70657261746f7220666f7220737472696e67730d0a7820202020202020202d2d2020537472696e67207265706561746174696f6e206f70657261746f720d0a2423202020202020202d2d2020746f74616c206e756d626572206f6620656c656d656e747320696e207468652061727261792e2020616e6420616c736f207573656420746f2067657420746865206c61737420656c656d656e7420696e20746865206172726179202065783a202423546573740d0a5055534820202020202d2d202070757368206f70657261746f7220616464732074686520646174612061742074686520656e64206f66207468652061727261790d0a504f502020202020202d2d2020504f5020206f70657261746f722072656d6f7665732074686520646174612061742074686520656e64206f66207468652061727261790d0a0d0a5348494654202020202d2d2020534849465420206f70657261746f722072656d6f7665732074686520646174612061742074686520626567696e696e67206f66207468652061727261790d0a554e534849465420202d2d2020554e5348494654206f70657261746f7220616464732074686520646174612061742074686520626567696e696e67206f66207468652061727261790d0a2609202d2d2020262028416d70657273616e642029207573656420746f2063616c6c206f7220696e766f6b652074686520737562726f7574696e650d0a0d0a405f2020202020202d2d206c697374206f6620706172616d65746572732070617373656420746f20737562726f7574696e65206f722066756e6374696f6e2e2053746f72657320616c6c20706172616d657465747320696e20746869732061727261792e0d0a245f2020202020202d2d20476574207468652076616c7565206f66207363616c6172207661726169626c6520696e206c6f6f703b0d0a0d0a3c092d2d2055736520696e20746865206f70656e2073746174656d656e742e20746f20726561642066726f6d2074686520696e706f75742066696c650d0a3e092d2d2055736520696e20746865206f70656e2073746174656d656e742020746f207772697465206f72207075742064617461206f6e20746f20746865206f75747075742066696c650d0a3e3e092d2d2055736520696e20746865206f70656e2073746174656d656e742020746f20617070656e64206461746120746f20746865206f75747075742066696c650d0a3c3e092d2d206469616d6f6e64206f70657261746f722069732061637475616c6c792061207370656369616c206b696e64206f66206c696e652d696e707574206f70657261746f720d0a2421092d2d2077696c6c206769766520796f75206120726561736f6e20666f72206661696c757265206f7220657863657074696f6e0d0a64696520092d2d2066756e6374696f6e207072696e7473206f757420746865206d65737361676520796f7520676976652069742028746f20746865207374616e64617264206572726f722073747265616d2c2077686572652073756368206d657373616765732073686f756c6420676f290d0a0d0a25092d2d207573656420746f2073706563696679207468652077686f6c6520686173682e0d0a7b7d092d2d207573656420746865207265666572206f72207370656369667920746865206861736820656c656d656e74730d0a3d3e092d2d207573656420746f20646966666572656e7469617465206265747765656e206b65797320616e642076616c75657320696e2068617368207461626c650d0a6b73614b'''.
2011-03-30 12:46:25.241960 2619 UserTrace BIP2568I: Node 'TestFlow_HexBinary.Compute': Copying sub-tree from ''InputRoot.BLOB.BLOB'' to ''OutputRoot.MRM.FileData''.
2011-03-30 12:46:25.241990 2619 UserTrace BIP2537I: Node 'TestFlow_HexBinary.Compute': Executing statement ''RETURN TRUE;'' at ('.TestFlow_HexBinary_Compute.Main', '20.3').
2011-03-30 12:46:25.242096 2619 UserTrace BIP4007I: Message propagated to 'out' terminal of node 'TestFlow_HexBinary.Compute'.
2011-03-30 12:46:25.242268 2619 UserTrace BIP5494I: The logical tree is now being matched to the message model.
2011-03-30 12:46:25.242316 2619 UserTrace BIP5564I: Item ''Header'' from the logical tree has matched with the message model as ''[MESSAGE]_File_Details/Header''.
2011-03-30 12:46:25.242346 2619 UserTrace BIP5564I: Item ''Username'' from the logical tree has matched with the message model as ''[MESSAGE]_File_Details/Header/Username''.
2011-03-30 12:46:25.242372 2619 UserTrace BIP5564I: Item ''Password'' from the logical tree has matched with the message model as ''[MESSAGE]_File_Details/Header/Password''.
2011-03-30 12:46:25.242394 2619 UserTrace BIP5564I: Item ''Hostname'' from the logical tree has matched with the message model as ''[MESSAGE]_File_Details/Header/Hostname''.
2011-03-30 12:46:25.242412 2619 UserTrace BIP5564I: Item ''Portnumber'' from the logical tree has matched with the message model as ''[MESSAGE]_File_Details/Header/Portnumber''.
2011-03-30 12:46:25.242430 2619 UserTrace BIP5564I: Item ''FilePath'' from the logical tree has matched with the message model as ''[MESSAGE]_File_Details/Header/FilePath''.
2011-03-30 12:46:25.242456 2619 UserTrace BIP5564I: Item ''FileName'' from the logical tree has matched with the message model as ''[MESSAGE]_File_Details/Header/FileName''.
2011-03-30 12:46:25.242476 2619 UserTrace BIP5564I: Item ''FileData'' from the logical tree has matched with the message model as ''[MESSAGE]_File_Details/FileData''.
2011-03-30 12:46:25.243494 2619 Error BIP2628E: Exception condition detected on input node 'TestFlow_HexBinary.MQInput'.
The input node 'TestFlow_HexBinary.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.
2011-03-30 12:46:25.243500 2619 RecoverableException BIP2230E: Error detected whilst processing a message in node 'TestFlow_HexBinary.TESTQ_FTPOUT_STORE'.
The message broker detected an error whilst processing a message in node 'TestFlow_HexBinary.TESTQ_FTPOUT_STORE'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.
2011-03-30 12:46:25.243506 2619 ParserException BIP5286E: Writing errors have occurred. Message set name: 'FTP_WTX_MS' Message format: 'Text1' Message type path: '/File_Details'
Review other error messages to find the cause of the errors.
2011-03-30 12:46:25.243510 2619 ParserException BIP5447S: Tagged/Delimited String Format (TDS) writing error while writing message ''/File_Details/FileData''
See following errors for more details.
2011-03-30 12:46:25.243516 2619 ParserException BIP5436S: Data length error: Element name: '69^FileData' Element type: 'Binary' Expected data length: 0 'Bytes' Actual data length: 1476 'Bytes' Data: '6D717369736974317C6D317132733369347C73666D7173696465766C327C32317C2F7661722F6462322F686F6D652F6D717369736974312F753030323735312F7C6D6F645754584654506F75747075742E747874235045524C202D2D202050726163746963616C2045787472616374696F6E20616E64205265706F7274204C616E67756167650D0A0D0A2E2028646F742920202D2D202020646F74206973206120636F6E636174656E6174696F6E206F70657261746F7220666F7220737472696E67730D0A7820202020202020202D2D2020537472696E67207265706561746174696F6E206F70657261746F720D0A2423202020202020202D2D2020746F7461...'
While a TDS message was being written, it was found that the data length was inconsistent with the element definition.
If the element is of binary data type, make sure that the length is the same as the expected length, as defined in the message definition.
If the element is of string data type, make sure the length is not greater than the expected length.
2011-03-30 12:46:26.244508 2619 UserTrace BIP2631I: Backed out message being propagated to failure terminal; node 'TestFlow_HexBinary.MQInput'.
Node 'TestFlow_HexBinary.MQInput' has received a message which has previously been backed out because of a processing error in the message flow. The MQMD 'backoutCount' of the message exceeds (or equals) the 'backoutThreshold' defined for the WebSphere MQ input queue. The message broker is propagating the message to the failure terminal of the node.
Examine the other 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.
2011-03-30 12:46:26.244750 2619 UserTrace BIP2638I: The MQ output node 'TestFlow_HexBinary.TESTQ.FAIL' attempted to write a message to queue ''TESTQ.FAIL'' connected to queue manager ''''. The MQCC was '0' and the MQRC was '0'.
2011-03-30 12:46:26.244760 2619 UserTrace BIP2622I: Message successfully output by output node 'TestFlow_HexBinary.TESTQ.FAIL' to queue ''TESTQ.FAIL'' on queue manager ''''.
|
|
Back to top |
|
 |
kimbert |
Posted: Wed Mar 30, 2011 1:06 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Everything that you have done looks sane and reasonable ( and thanks for providing the user trace and full error text without prompting ).
My best guess is that the TDS parser (wrongly) thinks that hexBinary elements cannot be delimited, so assumes that they must be fixed-length. So it applies a validation check which would only make sense if the element was fixed-length, although you have correctly set its parent type to 'All Elements Delmited'.
As a workaround, I suggest that you model the fileData as xs:string, and do the cast to hexBinary format in ESQL. You may need to remove a couple of characters from the start of the CASTed string. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|