Announcement

Collapse

Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

SAXParseException:Content is not allowed in prolog

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SAXParseException:Content is not allowed in prolog

    Hi, I am getting an parsing error when I get the ACK back from a HL7 broker. The parsing error occurs on MSH.2(Enconding Chars), below. Is there anything that can be done to avoid the parsing error ? Thanks in advance.

    MSH|^~\&|RecvSys|00273|SendingSys|00273|20080423095100||A CK^P03|CBFK002|P|2.3
    MSA|AA|CBFK002

    

    ERROR-301: Transformer conversion error
    ERROR MESSAGE: Error adapting message
    org.xml.sax.SAXParseException: Content is not allowed in prolog.
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(U nknown Source)
    at com.webreach.mirth.server.mule.adaptors.XMLAdaptor .populateMessage(XMLAdaptor.java:23)
    at com.webreach.mirth.server.mule.adaptors.Adaptor.ge tMessage(Adaptor.java:41)

  • #2
    Re:SAXParseException:Content is not allowed in prolog

    [Update] Correction on the encoding character above.I am sending and receiving: ^~\&

    Comment


    • #3
      Re:SAXParseException:Content is not allowed in prolog

      Sorry, let me this this again. There is a "" in between "~" and "&". For some reason, when I paste the message this is getting omitted.

      Comment


      • #4
        Re:SAXParseException:Content is not allowed in prolog

        The forum strips out <backward slash>. it's not your fault. but anyway, your MSH-2 looks ok. There's little information to diagnose what exactly causes the problem. Do all messages fail within the channel? If so, I'd think that it's the channel. Make sure that the message protocol type (in this case, it'd be HL7) is correctly set.
        Chris Ro
        Sr. Software Engineer | Mirth Corporation

        Comment


        • #5
          Re:SAXParseException:Content is not allowed in prolog

          The message goes out with no errors as HL7. The broker sends the ACK back and Mirth fails it on MSH2. Ir pretty much fails all the ACK's.

          On the sender channel I have LLP setup, protocol XML. I transform it and send a HL7 v2.x message. On the LLP sender I have Ignore ACK=false, Process HL7 ACK =false, since the Mirth is not taking it.

          Comment


          • #6
            Re:SAXParseException:Content is not allowed in prolog

            Can you copy/paste the failed HL7 message into one of the Message Templates within Mirth, and see if the message is properly parsed and displayed under the Message Tree tab? I think there's definitely something wrong with the message. Maybe there's a hidden invalid character somewhere. I've had a few of those before.
            Chris Ro
            Sr. Software Engineer | Mirth Corporation

            Comment


            • #7
              Re:SAXParseException:Content is not allowed in prolog

              Yes, I can copy and paste the message. Just to clarify, the MSH.2.1 goes out on the XML document as
              <MSH.2.1>^~(backslash)& amp ;</MSH.2.1> (Added spaces here intentionally).

              The MSA ACK result I get:
              MSH|^~(backslash)&|RecvSys|00273|SendingSys|00273| 20080423095100||ACK^P03|CBFK002|P|2.3
              MSA|AA|CBFK002

              ERROR-301: Transformer conversion error
              ERROR MESSAGE: Error adapting message
              org.xml.sax.SAXParseException: Content is not allowed in prolog.

              I am attaching a screenshot with the result.

              MSHAA.gif (2149 bytes)

              Note that the message shows partially in red, as it might represent a parsing issue. I also tried to send the <MSH.2.1> without the amp ; and instead sending the ASCII representation: "^ ~ (backslash) &", but the message fails and gives me the message:

              ERROR-301: Transformer conversion error
              ERROR MESSAGE: Error adapting message
              org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.

              Post edited by: mbarroso, at: 05/06/2008 09:19

              Comment


              • #8
                Re:SAXParseException:Content is not allowed in prolog

                Are you using Mirth 1.7.0 or 1.7.1?

                If you are using 1.7.0, you want to make sure that the "Encode Entities" and "Convert LF to CR" checkboxes are checked. They can be found in the Transformer Properties for both Source and Destination.

                They are by default enabled in 1.7.1.
                Chris Ro
                Sr. Software Engineer | Mirth Corporation

                Comment


                • #9
                  Re:SAXParseException:Content is not allowed in prolog

                  I am using Mirth 1.7.1 , the "Convert LF to CR" is enabled. The "Encode Entities" is not on 1.7.1.

                  Comment

                  Working...
                  X