com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character ' ' (code 32); expected a semi-colon after the reference for entity 's' at [row,col {unknown-source}]: [140,10]

Stack Overflow | Dom | 1 month ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Datamapper fails when ampersand is in the XML input payload

    Stack Overflow | 1 month ago | Dom
    com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character ' ' (code 32); expected a semi-colon after the reference for entity 's' at [row,col {unknown-source}]: [140,10]
  2. 0

    java.wso2.wsas.user - AXIS2 : IllegalArgumentException - msg#00002 - Recent Discussion OSDir.com

    osdir.com | 1 year ago
    java.lang.RuntimeException: [was class java.net.SocketTimeoutException] Read timed out
  3. 0

    Test code: {code:java} Abdera abdera = new Abdera(); AbderaClient client = new AbderaClient(abdera); ClientResponse resp = client.get("http://www.facebook.com/activitystreams/feed.php?source_id=499225640"); Document<Feed> doc = resp.getDocument(); doc.complete(); {code} When reading a stream that is gzip-compressed (such as the sample facebook stream above), Abdera throws an exception: {code} Exception in thread "main" org.apache.abdera.parser.ParseException: java.lang.RuntimeException: [was class java.io.EOFException] Unexpected end of ZLIB input stream at org.apache.abdera.parser.stax.FOMBuilder.next(FOMBuilder.java:260) at org.apache.axiom.om.impl.llom.OMNodeImpl.build(OMNodeImpl.java:318) at org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:614) at org.apache.abdera.parser.stax.FOMElement.complete(FOMElement.java:845) at org.apache.abdera.parser.stax.FOMFeed.sortEntries(FOMFeed.java:167) at FacebookStreamReader.main(FacebookStreamReader.java:42) Caused by: java.lang.RuntimeException: [was class java.io.EOFException] Unexpected end of ZLIB input stream at com.ctc.wstx.util.ExceptionUtil.throwRuntimeException(ExceptionUtil.java:18) at com.ctc.wstx.sr.StreamScanner.throwLazyError(StreamScanner.java:706) at com.ctc.wstx.sr.BasicStreamReader.safeFinishToken(BasicStreamReader.java:3655) at com.ctc.wstx.sr.BasicStreamReader.getText(BasicStreamReader.java:809) at org.apache.axiom.om.impl.builder.StAXBuilder.createOMText(StAXBuilder.java:245) at org.apache.axiom.om.impl.builder.StAXBuilder.createOMText(StAXBuilder.java:216) at org.apache.abdera.parser.stax.FOMBuilder.applyTextFilter(FOMBuilder.java:158) at org.apache.abdera.parser.stax.FOMBuilder.next(FOMBuilder.java:206) ... 5 more Caused by: java.io.EOFException: Unexpected end of ZLIB input stream at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:223) at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141) at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:92) at java.io.FilterInputStream.read(FilterInputStream.java:116) at org.apache.abdera.protocol.client.util.AutoReleasingInputStream.read(AutoReleasingInputStream.java:56) at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264) at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158) at java.io.InputStreamReader.read(InputStreamReader.java:167) at com.ctc.wstx.io.MergedReader.read(MergedReader.java:101) at com.ctc.wstx.io.ReaderSource.readInto(ReaderSource.java:84) at com.ctc.wstx.io.BranchingReaderSource.readInto(BranchingReaderSource.java:57) at com.ctc.wstx.sr.StreamScanner.loadMore(StreamScanner.java:967) at com.ctc.wstx.sr.BasicStreamReader.readTextSecondary(BasicStreamReader.java:4626) at com.ctc.wstx.sr.BasicStreamReader.readCoalescedText(BasicStreamReader.java:4124) at com.ctc.wstx.sr.BasicStreamReader.finishToken(BasicStreamReader.java:3699) at com.ctc.wstx.sr.BasicStreamReader.safeFinishToken(BasicStreamReader.java:3647) ... 10 more {code} If I force the stream to be un-compressed, via this code, it works: {code:java} Abdera abdera = new Abdera(); AbderaClient client = new AbderaClient(abdera); RequestOptions options = client.getDefaultRequestOptions(); options.setAcceptEncoding((String)null); ClientResponse resp = client.get("http://www.facebook.com/activitystreams/feed.php?source_id=499225640", options); Document<Feed> doc = resp.getDocument(); doc.complete(); {code} There is some code in org.apache.abdera.protocol.client.util.AutoReleasingInputStream that is not properly handling the EOFException. If I modify that code to also catch the EOFException and behave as though it had gotten back a -1 from the read() method, then it also starts working.

    Apache's JIRA Issue Tracker | 7 years ago | James Falkner
    org.apache.abdera.parser.ParseException: java.lang.RuntimeException: [was class java.io.EOFException] Unexpected end of ZLIB input stream
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    WSO2 ESB Users - WSSecurityException: Error in converting SOAP Envelope to Document

    nabble.com | 8 months ago
    org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF; was expecting a close tag for element <rn2:Century>  at [row,col {unknown-source}]: [4,5335]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.ctc.wstx.exc.WstxUnexpectedCharException

      Unexpected character ' ' (code 32); expected a semi-colon after the reference for entity 's' at [row,col {unknown-source}]: [140,10]

      at com.ctc.wstx.exc.WstxLazyException.throwLazily()
    2. Woodstox
      BasicStreamReader.getText
      1. com.ctc.wstx.exc.WstxLazyException.throwLazily(WstxLazyException.java:45)
      2. com.ctc.wstx.sr.StreamScanner.throwLazyError(StreamScanner.java:720)
      3. com.ctc.wstx.sr.BasicStreamReader.safeFinishToken(BasicStreamReader.java:3677)
      4. com.ctc.wstx.sr.BasicStreamReader.getText(BasicStreamReader.java:858)
      4 frames
    3. Axiom API
      StAXOMBuilder.next
      1. org.apache.axiom.om.impl.builder.StAXBuilder.createOMText(StAXBuilder.java:289)
      2. org.apache.axiom.om.impl.builder.StAXBuilder.createOMText(StAXBuilder.java:250)
      3. org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:252)
      3 frames
    4. Axiom Impl
      SOAPBodyImpl.addChild
      1. org.apache.axiom.om.impl.llom.OMSerializableImpl.build(OMSerializableImpl.java:78)
      2. org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:722)
      3. org.apache.axiom.om.impl.llom.OMElementImpl.detach(OMElementImpl.java:700)
      4. org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImpl.java:105)
      5. org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:296)
      6. org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:212)
      7. org.apache.axiom.soap.impl.llom.SOAPBodyImpl.addChild(SOAPBodyImpl.java:231)
      7 frames
    5. org.wso2.carbon
      DataMapperMediator.mediate
      1. org.wso2.carbon.mediator.datamapper.DataMapperMediator.transform(DataMapperMediator.java:340)
      2. org.wso2.carbon.mediator.datamapper.DataMapperMediator.mediate(DataMapperMediator.java:256)
      2 frames
    6. Apache Synapse - Core
      SynapseCallbackReceiver.receive
      1. org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
      2. org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:260)
      3. org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:766)
      4. org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:282)
      5. org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:554)
      6. org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:188)
      6 frames
    7. org.apache.axis2
      AxisEngine.receive
      1. org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
      1 frame
    8. org.apache.synapse
      ClientWorker.run
      1. org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:261)
      1 frame
    9. Apache Axis2 - Transport - Base
      NativeWorkerPool$1.run
      1. org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
      1 frame
    10. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      3. java.lang.Thread.run(Unknown Source)
      3 frames