Microsoft KB Archive/870950

= BUG: You receive a &quot;Unexpected end of stream&quot; error message when you try to parse a message by using migrated schema in BizTalk Server 2004 =

Article ID: 870950

Article Last Modified on 8/9/2006

-

APPLIES TO


 * Microsoft BizTalk Server 2004 Developer Edition
 * Microsoft BizTalk Server 2004 Enterprise Edition
 * Microsoft BizTalk Server 2004 Partner Edition
 * Microsoft BizTalk Server 2004 Standard Edition

-





SYMPTOMS
When you try to parse a message by using migrated schema in Microsoft BizTalk Server 2004, you may receive an error message that is similar to the following:

Unexpected end of stream while looking for: '060=' at offset 4 '960' at offset 4 '950' at offset 4 '050=C' at offset 4 '051=P' at offset 4 '998=KIT' at offset 4 '990' at offset 4 '998=END KIT' at offset 4 '999=' at offset 4 '\r\n' '000' at offset 4 The current definition being parsed is OrderLines. The stream offset where the error occured is 402. HRESULT: 80131940



RESOLUTION
To work around this problem, remove the root node child delimiter (set to none).

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

Sample schema
            </xs:appinfo> </xs:annotation> <xs:complexType> <xs:sequence>   <b:groupInfo sequence_number=&quot;0&quot; /> </xs:appinfo> </xs:annotation> <xs:element name=&quot;Field1&quot; type=&quot;xs:string&quot;>   <b:fieldInfo sequence_number=&quot;1&quot; justification=&quot;left&quot; /> </xs:appinfo> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>

<div class="status_section">

STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the &quot;Applies to&quot; section.

<div class="moreinformation_section">

MORE INFORMATION
The BizTalk Server 2004 flat file parser is implemented as an LL(k) Parser or Look-ahead LL Parser. The grammar can be generated from the XSD schema in one of the following two ways:
 * Speed mode: The speed mode lets the user to generate an efficient grammar that minimizes the number of production rules that you must have to represent the flat file structure. The downside of this mode is that complex structures may not parse correctly. The complexity mode generates a grammar that is much more comprehensive and must be used when the structure of the flat file is more complex.
 * Complexity mode: The complexity of a flat file structure increases exponentially as the number of optional children and repeating children and depth increases. The downside of this mode is that parsing can be slower. And, in very complex schemas, the grammar generation and optimization can take a long time. Sometimes the complexity of the grammar causes an out-of-memory condition when performing the grammar optimization.

Because it cannot be dynamically determined which mode best suits a particular schema, Microsoft decided that the better alternative for migrating schemas from BizTalk Server 2000 and BizTalk Server 2002 was to set the parser optimization to speed for the fastest and most efficient processing of the migrated flat file schemas.

Keywords: kbbiztalk2004-2006swept kbtshoot kbbug KB870950

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.