Uploaded image for project: 'WSO2 ESB'
  1. WSO2 ESB
  2. ESBJAVA-2707

[ESB 4.8] - Enabling Streaming XPath causes message building errors

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 4.8.0 Alpha
    • Fix Version/s: 4.8.0 , 4.8.0 RC1
    • Component/s: Core Engine
    • Labels:
      None
    • Environment:

      Operating System : Linux
      Java Version/Java VM :1.7.0
      Browser : Firefox
      Setup : Local

    • Severity:
      Major
    • Estimated Complexity:
      Moderate
    • Test cases added:
      Yes

      Description

      Source:http://wso2.com/library/articles/2013/01/esb-performance-65/

      Steps to reproduce
      --------------------
      1.) Enable Streaming XPath in synapse.properties
      2.)Send Following request:
      curl -v -X POST -H "Content-Type: text/xml" -H "SOAPAction:urn:buyStocks" -H "valid:true" -H "routing:xadmin;server1;community#1.0##" -H"Expect:" -d @requests/100K_buyStocks.xml http://localhost:8291/services/CBRProxy

      Exception:
      ---------------

      [2013-11-19 17:00:48,699] ERROR - RelayUtils Error while building Passthrough stream
      org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
      Message: Content is not allowed in prolog.
      at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
      at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:204)
      at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:154)
      at org.apache.axiom.om.impl.AbstractOMMetaFactory.createStAXSOAPModelBuilder(AbstractOMMetaFactory.java:73)
      at org.apache.axiom.om.impl.AbstractOMMetaFactory.createSOAPModelBuilder(AbstractOMMetaFactory.java:79)
      at org.apache.axiom.om.OMXMLBuilderFactory.createSOAPModelBuilder(OMXMLBuilderFactory.java:196)
      at org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:55)
      at org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:118)
      at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessageWithStream(RelayUtils.java:95)
      at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:86)
      at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:73)
      at org.apache.synapse.config.xml.SynapsePath.getMessageInputStreamPT(SynapsePath.java:166)
      at org.apache.synapse.util.xpath.SynapseXPath.stringValueOf(SynapseXPath.java:275)
      at org.apache.synapse.mediators.filters.FilterMediator.test(FilterMediator.java:271)
      at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:129)
      at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:77)
      at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:47)
      at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:131)
      at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:166)
      at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
      at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:403)
      at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:183)
      at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)
      Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
      Message: Content is not allowed in prolog.
      at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:592)
      at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
      at org.apache.axiom.util.stax.dialect.DisallowDoctypeDeclStreamReaderWrapper.next(DisallowDoctypeDeclStreamReaderWrapper.java:34)
      at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
      at org.apache.axiom.util.stax.dialect.SJSXPStreamReaderWrapper.next(SJSXPStreamReaderWrapper.java:138)
      at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
      at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
      ... 25 more

        Attachments

          Activity

            People

            • Assignee:
              shafreen@wso2.com shafreen anfar
              Reporter:
              iranga@wso2.com Iranga Muthuthanthri
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: