locked
Error:Invalid input/output document into/from the transform. Does not have a single root node.. RRS feed

  • General discussion

  • I have a scenario where I am creating 8 out a possible 19 documents in a biztalk multipart message. Those are then split out and written out as flat files and further processing is done. While smoke testing this code in production  I would get the following: 

    xlang/s engine event log entry: Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'Service(88334d69-76cb-9cc5-17bd-181baa4bfa09)'.

    The service instance will remain suspended until administratively resumed or terminated.

    If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.

    InstanceId: fe3aa9be-6c59-4aeb-8b55-a56e393ed577

    Shape name: Make CSV Message

    ShapeId: 096064b5-289b-4f1d-be22-be85a9cf400c

    Exception thrown from: segment 1, progress 39

    Inner exception: Error encountered while executing the transform Service. Error:Invalid input/output document into/from the transform. Does not have a single root node..

           

    Exception type: XTransformationFailureException

    Source: Microsoft.XLANGs.Engine

    Target Site: Void ShredXmlDocumentStream(System.IO.Stream, System.Object[], System.String, System.Xml.XmlDeclaration)

    The following is a stack trace that identifies the location where the exception occured

     

       at Microsoft.XLANGs.Core.Service.Transform.ShredXmlDocumentStream(Stream inputStream, Object[] outParams, String mapName, XmlDeclaration xmlDecl)

       at Microsoft.XLANGs.Core.Service.ApplyStreamingTransform(Type mapRef, TransformMetaData trfMetaData, Object[] outParams, Stream[] inStreams, Boolean whitespaceCorrect)

       at Microsoft.XLANGs.Core.Service.ApplyTransform(Type mapRef, Object[] outParams, Object[] inParams)

       at OracleERP.Customers.Orchestrations.CustomerTransportService.segment1(StopConditions stopOn)

       at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)

    Not a very helpful message. To resolve this message error I changed the Large message size property to 100000 KB in the Group settings page. 

    I based that course of action on this documentation: 

    1. If the incoming message is not being published under the context of an existing MSDTC transaction, then a new MSDTC transaction is created to write the message fragments.
      • Increase the value for Large message fragment size to reduce the frequency with which large messages are fragmented and reduce the incidence of creating the associated MSDTC transactions. This should be done because excessive use of MSDTC transactions is expensive from a performance standpoint. Note that increasing this value may also increase the amount of available memory that is used. 

      My working hypothesis is that if the large message size property is smaller then the sum of the output message parts it breaks those up into individual parts and tries to persist those to the message box individually. When those messages are blank you get that error because the engine is treating those messages individually. Increasing that value causes those individual message parts to be persisted to the database as a single multi-part message voila it works. 

      Has anyone ran into this scenario before and resolved it either the same way or in another way? Also can anyone confirm my hypothesis or give me another valid rationale for why what I did worked? 



    Brian Stott

    Monday, April 1, 2019 3:28 PM