com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row,col {unknown-source}]: [1,43]

mulesoft.org | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    When an empty Xml object is passed on to the Web Service Consumer, then an exception that hints nothing about the actual issue is being thrown. Attached is a mule-app to reproduce this scenario. The object being feed to the WSC is {code}<?xml version="1.0" encoding="ISO-8859-1"?>{code} and the exception thrown is: {code} WARN 2015-05-26 15:37:43,617 [[failing-servicenow_copy].HTTP_Listener_Configuration.worker.01] org.apache.cxf.phase.PhaseInterceptorChain: Interceptor for {http://support.cxf.module.mule.org/}ProxyService#{http://support.cxf.module.mule.org/}invoke has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: COULD_NOT_READ_XML_STREAM at org.apache.cxf.databinding.stax.StaxDataBinding$XMLStreamDataWriter.write(StaxDataBinding.java:151) ~[cxf-rt-core-2.7.15.jar:2.7.15] at org.apache.cxf.databinding.stax.StaxDataBinding$XMLStreamDataWriter.write(StaxDataBinding.java:135) ~[cxf-rt-core-2.7.15.jar:2.7.15] at org.apache.cxf.databinding.stax.StaxDataBinding$XMLStreamDataWriter.write(StaxDataBinding.java:131) ~[cxf-rt-core-2.7.15.jar:2.7.15] ... ... at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_55] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_55] at java.lang.Thread.run(Thread.java:745) [?:1.7.0_55] Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row,col {unknown-source}]: [1,43] at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:685) ~[woodstox-core-asl-4.4.1.jar:4.4.1] at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2141) ~[woodstox-core-asl-4.4.1.jar:4.4.1] at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2047) ~[woodstox-core-asl-4.4.1.jar:4.4.1] at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1131) ~[woodstox-core-asl-4.4.1.jar:4.4.1] at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:767) ~[cxf-api-2.7.15.jar:2.7.15] at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:697) ~[cxf-api-2.7.15.jar:2.7.15] at org.apache.cxf.databinding.stax.StaxDataBinding$XMLStreamDataWriter.write(StaxDataBinding.java:142) ~[cxf-rt-core-2.7.15.jar:2.7.15] ... 180 more ERROR 2015-05-26 15:37:43,982 [[failing-servicenow_copy].HTTP_Listener_Configuration.worker.01] org.mule.exception.DefaultMessagingExceptionStrategy: ******************************************************************************** Message : COULD_NOT_READ_XML_STREAM. Failed to route event via endpoint: org.mule.module.cxf.CxfOutboundMessageProcessor. Message payload is of type: PushbackInputStream Code : MULE_ERROR--2 -------------------------------------------------------------------------------- Exception stack is: 1. Unexpected EOF in prolog at [row,col {unknown-source}]: [1,43] (com.ctc.wstx.exc.WstxEOFException) com.ctc.wstx.sr.StreamScanner:685 (null) 2. COULD_NOT_READ_XML_STREAM (org.apache.cxf.interceptor.Fault) org.apache.cxf.databinding.stax.StaxDataBinding$XMLStreamDataWriter:151 (null) 3. COULD_NOT_READ_XML_STREAM. Failed to route event via endpoint: org.mule.module.cxf.CxfOutboundMessageProcessor. Message payload is of type: PushbackInputStream (org.mule.api.transport.DispatchException) org.mule.module.cxf.CxfOutboundMessageProcessor:161 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transport/DispatchException.html) -------------------------------------------------------------------------------- Root Exception stack trace: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row,col {unknown-source}]: [1,43] at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:685) at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2141) at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2047) + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything) ********************************************************************************{code}

    MuleSoft JIRA | 2 years ago | Alejandro Garcia Marra
    com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row,col {unknown-source}]: [1,43]
  2. 0

    When an empty Xml object is passed on to the Web Service Consumer, then an exception that hints nothing about the actual issue is being thrown. Attached is a mule-app to reproduce this scenario. The object being feed to the WSC is {code}<?xml version="1.0" encoding="ISO-8859-1"?>{code} and the exception thrown is: {code} WARN 2015-05-26 15:37:43,617 [[failing-servicenow_copy].HTTP_Listener_Configuration.worker.01] org.apache.cxf.phase.PhaseInterceptorChain: Interceptor for {http://support.cxf.module.mule.org/}ProxyService#{http://support.cxf.module.mule.org/}invoke has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: COULD_NOT_READ_XML_STREAM at org.apache.cxf.databinding.stax.StaxDataBinding$XMLStreamDataWriter.write(StaxDataBinding.java:151) ~[cxf-rt-core-2.7.15.jar:2.7.15] at org.apache.cxf.databinding.stax.StaxDataBinding$XMLStreamDataWriter.write(StaxDataBinding.java:135) ~[cxf-rt-core-2.7.15.jar:2.7.15] at org.apache.cxf.databinding.stax.StaxDataBinding$XMLStreamDataWriter.write(StaxDataBinding.java:131) ~[cxf-rt-core-2.7.15.jar:2.7.15] ... ... at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_55] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_55] at java.lang.Thread.run(Thread.java:745) [?:1.7.0_55] Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row,col {unknown-source}]: [1,43] at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:685) ~[woodstox-core-asl-4.4.1.jar:4.4.1] at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2141) ~[woodstox-core-asl-4.4.1.jar:4.4.1] at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2047) ~[woodstox-core-asl-4.4.1.jar:4.4.1] at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1131) ~[woodstox-core-asl-4.4.1.jar:4.4.1] at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:767) ~[cxf-api-2.7.15.jar:2.7.15] at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:697) ~[cxf-api-2.7.15.jar:2.7.15] at org.apache.cxf.databinding.stax.StaxDataBinding$XMLStreamDataWriter.write(StaxDataBinding.java:142) ~[cxf-rt-core-2.7.15.jar:2.7.15] ... 180 more ERROR 2015-05-26 15:37:43,982 [[failing-servicenow_copy].HTTP_Listener_Configuration.worker.01] org.mule.exception.DefaultMessagingExceptionStrategy: ******************************************************************************** Message : COULD_NOT_READ_XML_STREAM. Failed to route event via endpoint: org.mule.module.cxf.CxfOutboundMessageProcessor. Message payload is of type: PushbackInputStream Code : MULE_ERROR--2 -------------------------------------------------------------------------------- Exception stack is: 1. Unexpected EOF in prolog at [row,col {unknown-source}]: [1,43] (com.ctc.wstx.exc.WstxEOFException) com.ctc.wstx.sr.StreamScanner:685 (null) 2. COULD_NOT_READ_XML_STREAM (org.apache.cxf.interceptor.Fault) org.apache.cxf.databinding.stax.StaxDataBinding$XMLStreamDataWriter:151 (null) 3. COULD_NOT_READ_XML_STREAM. Failed to route event via endpoint: org.mule.module.cxf.CxfOutboundMessageProcessor. Message payload is of type: PushbackInputStream (org.mule.api.transport.DispatchException) org.mule.module.cxf.CxfOutboundMessageProcessor:161 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transport/DispatchException.html) -------------------------------------------------------------------------------- Root Exception stack trace: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row,col {unknown-source}]: [1,43] at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:685) at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2141) at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2047) + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything) ********************************************************************************{code}

    MuleSoft JIRA | 2 years ago | Alejandro Garcia Marra
    com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row,col {unknown-source}]: [1,43]
  3. 0

    [MULE-8647] WebServiceConsumer throws cxf exception when empty xml body is received - JIRA

    mulesoft.org | 6 months ago
    com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row,col {unknown-source}]: [1,43]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.ctc.wstx.exc.WstxEOFException

      Unexpected EOF in prolog at [row,col {unknown-source}]: [1,43]

      at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF()
    2. Woodstox
      BasicStreamReader.nextFromProlog
      1. com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:685)
      2. com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2141)
      3. com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2047)
      3 frames