|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
TDS Message Problem - Not enough data in bitstream |
« View previous topic :: View next topic » |
Author |
Message
|
satya2481 |
Posted: Tue Jul 22, 2008 10:43 am Post subject: TDS Message Problem - Not enough data in bitstream |
|
|
Disciple
Joined: 26 Apr 2007 Posts: 170 Location: Bengaluru
|
Hi,
I am facing a strange problem in V6.0 Message Broker related to TDS message sets. I have created 2 message sets (Different message set projects - Invoice and InvoiceDetail) which are of the same message structure but few fields differ in the messages. The message structure for both these messages looks like below...
Invoice Message structure
Code: |
Invoice - Message Name
I0F609 - Complex Element
FILE_NAME - Field with fixed length 6
COMPANY - Field with fixed length 3
INVOICE_NO - Field with fixed length 20
|
´
InvoiceDetail Message structure
Code: |
Invoice - Message Name
I0F610 - Complex Element
FILE_NAME - Field with fixed length 6
COMPANY - Field with fixed length 3
INVOICE_NO - Field with fixed length 20
INVOICE_DATE - Field with fixed length 8
|
´
For these message strcture my message definition looks like...
Invoice Message structure
Code: |
Invoice - Message (Of type Invoice_T)
Invoice_T - Complex element Fixed Length
I0F609 - Complex element of type I0F609_T, Max Occ = -1 RED = <CR><LF>
FILE_NAME - Field with fixed length 6
COMPANY - Field with fixed length 3
INVOICE_NO - Field with fixed length 20
|
´
InvoiceDetail message is also defined similar to Invoice message.
Sample message for these structures looks like
I0F609ABB100012389101112131420<CR><LF>
I0F609ABB100012389101112131420<CR><LF>
-----------------------
When I did unit testing of these message structures Invoice message worked fine. Now I am getting an exception for InvoiceDetail message - Not enough data in bitstream.
Apart from this when I close and reopen this project in V6.0 Toolkit I am getting an error - Message definition corrupted... !!! If I rebuild the project error disappears.
I tried to delete the entire project and recreated, Removed the .metadata folder from the workspace and rebuilt the toolkit again. Still the problem persists. Why the toolkit behaves correct for one message set and not works for other message set?
I tried to define the message as given in the link
http://www.mqseries.net/phpBB2/viewtopic.php?t=35190&highlight=enough+data+bitstream It worked once after that again the same problem - Not enough data in bitstream.
Any help on this...
Thanks in advance. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jul 22, 2008 10:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Are you sure your buffer contains <CR><LF> as eol or could it be that it only contains <LF> as eol?
As well if the last record is supposed to end with <CR><LF> and the buffer does not contain these 2...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kimbert |
Posted: Tue Jul 22, 2008 1:07 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
I'll take a guess.
The RED ( repeating element delimiter) is an 'infix' delimiter. That means that the parser expects it to occur between one occurence and the next.
When the parser sees the final <CR><LF> it interprets it as the RED, and looks for the next repeat. There is nothing left in the bitstream, so it throws the exception.
If you were on v6.1, you could take a debug-level user trace and see it all happening.
Solution: Define <CR><LF> as the Group Terminator for the outer complex type. It doesn't matter if the final <CR><LF> is missing because Group Indicators are allowed to be missing. |
|
Back to top |
|
 |
satya2481 |
Posted: Wed Jul 23, 2008 1:32 am Post subject: Solved - Not Enough Data in Bitstream |
|
|
Disciple
Joined: 26 Apr 2007 Posts: 170 Location: Bengaluru
|
Hi fjb_saper and Kimbert,
Thank you very much for your quick and valuable response. Today I recreated the messages sets and created a test message manually it worked fine. My message definition looks as below
Code: |
Invoice - Message Name
I0F610 - Complex Element, MinOcc = 1, MaxOcc = -1, RED = None, Group Terminator = <CR><LF>
FILE_NAME - Fixed Length Element of type String, Length = 6, 1 to 1
COMPANY - Fixed Length Element of type String, Length = 3, 1 to 1
INVOICE_NBR - Fixed Length Element of type String, Length = 50, 1 to 1
|
Once after this I used the test message provided by the customers which didnt worked. I compared both the messages, my test message and the customers test message. I found that in my test message <CR><LF> was the delimiter where as in the customer test message only <LF> was the demiliter. As indicated by fjb_saper.
Once after changing the group terminator from <CR><LF> to <LF> everything worked smoothly. Wasted 1 day to find out cause for this issue
Once again thank you for your valuable reply.
Satya |
|
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
|
|
|
|