none
EDIFACT Message with LF delimiters RRS feed

  • Question

  • Hi,
    I have EDIFACT message which cannot be processed.

    The interchange with id '00000000136272', with sender id '9000101000009', receiver id '0000000001' had structural error. A likely cause is invalid segment terminator due to missing Carriage Line and/or Line Feed seperators. The part after the error is being suspended, refer to Suspended Queue for details.

    I mean it could be due to end line delimiters. When i open this message in notepad I saw only one long line of text.

    Can someone please help me?


    Michal Straka
    Tuesday, March 17, 2009 8:50 AM

Answers

All replies

  • Hi Michal,

    The error message says that it has structural errors. Can you check the order of segments ?

    UNA, UNB, UNG, UNH, .... UNT, UNE, UNZ whether they are occuring in the right order ?

    I have seen the same error when UNH is not at all present in the message. The issue can occur if the first UNH is not read properly, so check if there are any redundant characters around the UNH.

    If this doesnt solve your issue, can you post the instance ?

    Regards,
    Kowshik Palivela
    Tuesday, March 17, 2009 10:38 AM
  • Hi,
    Thank you very much, I mean my error is due to each line ends with ' and LF only. It's in UNIX format. When I manually change message format to DOS (each line ends witch CRLF) and set EfactDelimiters in ReceivePipeline to "0x3A, 0x2B, 0x2C, 0x3F, 0x20, 0x27, 0x0D, 0x0A" then message has been succesfully processed. But customer send messages only with LF on each row.

    Any solution?

    Michal Straka
    Tuesday, March 17, 2009 11:41 AM
  • Try to set EfactDelimeters in receivePipeline to "0x3A, 0x2B, 0x2C, 0x3F, 0x20, 0x27, 0x0A". Here I just excluded CR .


    Thanks
    Gyan
    • Proposed as answer by Tiago Lemes Thursday, November 29, 2012 5:33 PM
    Tuesday, March 17, 2009 12:50 PM
  • Hi,
    thank you for your help. But I try your solution and I'am facing to another error:

    A message received by adapter "FILE" on receive location "Inbox" with URI "C:\Biztalk Transfer\Inbox\*.txt" is suspended.
     Error details: There was a failure executing the receive pipeline: "Microsoft.BizTalk.Edi.DefaultPipelines.EdiReceive, Microsoft.BizTalk.Edi.EdiPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "EDI disassembler" Receive Port: "FileSystemReceivePort" URI: "C:\Biztalk Transfer\Inbox\*.txt" Reason: Object reference not set to an instance of an object. 
     MessageId:  {AA0E11B2-B567-481D-8395-C7BAD314E2FB}
     InstanceID: {C032B387-867D-4372-902E-3DCCFCB8DAB5}

    Any other ideas?

    Michal Straka
    Tuesday, March 17, 2009 12:55 PM
  • Hi,

     The error description doesn't give much details about the reason for error. Check in the event viewer if it has some rich error message, otherwise it will be easy for us to repro the issue if you can post the instance and the schema.

    Can you validate the instance in the visual studio against the schema ? as given in http://mohsinkalam.wordpress.com/2007/11/14/xml-tools/ we might get some more information on the error.

    Regards,
    Kowshik Palivela
    Tuesday, March 17, 2009 2:34 PM
  • Hi Michal,
                   Are you sure that segment terminator suffix is LF? Actually it can be 4 things None, CR, LF, CRLF. And in the notepad you can only see the CRLF. If total message is coming in one line then it can contain suffix as None,CR,LF. You tried it with LF. Please try with None and CR also.

    For CR Efact delimeters will be: "0x3A, 0x2B, 0x2C, 0x3F, 0x20, 0x27, 0x0D"

    And for None it will be :  ""0x3A, 0x2B, 0x2C, 0x3F, 0x20, 0x27"




    Thanks
    Gyan
    Tuesday, March 17, 2009 4:31 PM
  • Hi Gyan,
    thank you very much. I am sure that segment terminator is only LF. Below, you can see example in Hexadecimal:

    UNH+1+IFTMIN:D:96A:UN' ends with "4E27 0A" in HEX. 4E is N, 27 is ' and 0A is LF. There is no CR delimiter.

    I tried every Efact Delimiter which i know:

    0x3A, 0x2B, 0x2C, 0x3F, 0x20, 0x27 - suspend message (something like "Wrong segment terminator")
    0x3A, 0x2B, 0x2C, 0x3F, 0x20, 0x27, 0x0D, 0x0A - (CRLF) works well when I manually add CR sequence to each row.
    0x3A, 0x2B, 0x2C, 0x3F, 0x20, 0x27, 0x0D - throws error: Object reference not set to an instance of an object.
    0x3A, 0x2B, 0x2C, 0x3F, 0x20, 0x27, 0x0A - throws error: Object reference not set to an instance of an object.

    So I mean there must be something wrong with EfactDelimiter settings. When i set wrong delimiter, I expect error message like "Wrong segment terminator" and not "Object reference not set to an instance of an object".

    Any other ideas?

    Michal Straka
    Tuesday, March 17, 2009 8:40 PM
  • Sorry to late reply. Actually This was a bug in R2 and it has been fixed in BTS2009. So this problem will not come if you will be using BTS2009. I think you are using Biztalk server 2006 R2. Either you can upgrade to BTS2009 or you can contact to your support for Microsoft to resolve it.


    Thanks
    Gyan
    Wednesday, March 18, 2009 6:42 AM
  • Hi,
    thank you very much. I have last question. Is the any possibility how to change message before it's processed by EDI disasembler? I need to add UNA segment on begening of message or I need to change line break to CRLF.

    Thank you very much

    Michal Straka
    Wednesday, March 18, 2009 1:10 PM
  • Hi,
         You can write a simple program that reads the Data and replacing LF to CRLF. You can go to the same type of discussion here http://social.msdn.microsoft.com/Forums/en-US/biztalkediandas2/thread/8439ec9e-c484-41d1-8152-befe7130be6c  



    Thanks
    Gyan
    Wednesday, March 18, 2009 1:28 PM
  • Just to clarify, you could add processing to change the LF to a CRLF using a custom pipeline component. Leonid Ganeline has a nice pre-built component to help with this: http://geekswithblogs.net/LeonidGaneline/archive/2007/08/22/114895.aspx.

    Thanks,
    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Wednesday, March 18, 2009 4:24 PM
    Moderator