Skip to Content
avatar image
Former Member

[org.xml.sax.SAXParseException: Content is not allowed in prolog.]

Hi,

I am using Version 12.1.5 Build(77)

My scenario is XML payload messages are received at XMIIlistener and i am able to use the Query action block read the message received. After that when i use the repeater and Read message action block to read the message payload (using messageId ) i am getting the following error

ERROR] Error found trying to execute action 'Read_Message_0' Exception: [Content is not allowed in prolog.]

[WARN] [Read_Message_0] Skipping execution of output links due to action failure.

[ERROR] [Read_Message_0] Action: Runtime threw an exception. Exception: [org.xml.sax.SAXParseException: Content is not allowed in prolog.]

[DEBUG] [Read_Message_0]: Finished[ <1 ms] Succeeded: false

I have validated the XML document payment with the Eclipse . The payload seems to be perfectly alright. But i am still getting the following error.

Any tips / suggestions please.

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Aug 20, 2010 at 06:55 AM

    Hi,

    please check if there is any character at the beginning of the XML. Maybe you have to use a Hex-Editor. The error seems to be caused if there are characters before the " http://en.wikipedia.org/wiki/Byte_Order_Mark] for example.

    If you use

    <?xml version="1.0" encoding="utf-8"?>

    you may also try to omit the UTF and check if it works (see following [discussion|http://stackoverflow.com/questions/649209/content-not-allowed-in-prolog-exception]).

    Michael

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 25, 2010 at 02:29 PM

    For some reason when i use the Http post

    under document to post, the message is not getting inserted into the JCOmessages table .

    When Read query action runs it try to read the empty string and hence it was throwing this error

    I used SOAPUp to post the xml document to resolve this issue

    Add comment
    10|10000 characters needed characters exceeded