java.io.IOException: mark/reset not supported

Oracle Community | 843797 | 1 decade ago
  1. 0

    parsing inputstream problem for second time

    Oracle Community | 1 decade ago | 843834
    java.io.IOException: mark/reset not supported
  2. 0

    Exception when  XML InputStream is parsed with DOMParser

    Oracle Community | 1 decade ago | 843834
    java.io.IOException: mark/reset not supported
  3. 0

    Repeated object sending problem

    Oracle Community | 1 decade ago | 843797
    java.io.IOException: mark/reset not supported
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [Mifos-developer] Error during creating borrower

    Google Groups | 4 years ago | Gela
    java.lang.RuntimeException: java.io.IOException: mark/reset not supported
  6. 0

    BNF reports problems crawling http://presse.parti-socialiste.fr/ and related sites. Turns out http://presse.parti-socialiste.fr/ is returning 'Transfer-encoding: chunked' (an HTTP/1.1 feature) even though Heritrix's request is HTTP/1.0. This server behavior is counter to the HTTP/1.1 specification; see <http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6>, which says: "A server MUST NOT send transfer-codings to an HTTP/1.0 client.") When the HTTPClient library sees that encoding, it attempts to use mark/reset functionality on the connection's inputstream. That would be fine with the usual buffered inputstream, but our inserted recording functionality doesn't offer mark/reset -- and this is the first time that limitation has bit us. The exception stack is: 2007-03-23T01:30:50.048Z -2 1 http://presse.parti-socialiste.fr/ - - text/html #002 - - - le:IOException@HTTP java.io.IOException: mark/reset not supported at java.io.InputStream.reset(InputStream.java:331) at org.apache.commons.httpclient.HttpConnection.isResponseAvailable(HttpConnection.java:933) at org.apache.commons.httpclient.HttpMethodBase.readResponseBody(HttpMethodBase.java:1719) at org.apache.commons.httpclient.HttpMethodBase.readResponseBody(HttpMethodBase.java:1662) at org.archive.httpclient.HttpRecorderGetMethod.readResponseBody(HttpRecorderGetMethod.java:98) at org.archive.crawler.fetcher.FetchHTTP$2.readResponseBody(FetchHTTP.java:472) at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1625) at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1002) at org.archive.httpclient.HttpRecorderGetMethod.execute(HttpRecorderGetMethod.java:116) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346) at org.archive.crawler.fetcher.FetchHTTP.innerProcess(FetchHTTP.java:489) at org.archive.crawler.framework.Processor.process(Processor.java:109) at org.archive.crawler.framework.ToeThread.processCrawlUri(ToeThread.java:302) at org.archive.crawler.framework.ToeThread.run(ToeThread.java:151) Even though this site violates HTTP/1.1, we want to be able to get it and others like it, and the HTTPClient library can handle chunked encoding if we help it with a suitable stream. It appears enough to rearrange the order of stream-wrapping in HttpConnection.open(), putting our recording-streams inside rather than outside the buffered streams. Then the expected mark/reset functionality is available, there is no IOException, and collection succeeds.

    JIRA | 10 years ago | Gordon Mohr
    java.io.IOException: mark/reset not supported

    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. java.io.IOException

      mark/reset not supported

      at java.io.InputStream.reset()
    2. Java RT
      InputStream.reset
      1. java.io.InputStream.reset(InputStream.java:329)
      1 frame