Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-479

Running Wget results in UnsupportedOperationException

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Protocol - HTTP
    • Labels:
      None
    • Environment:
      with JDK 1.5 and 1.6, on Windows and Mac OS

      Description

      Running Wget in the example results in UnsupportedOperationException, because it calls slice() on a UnderivableBuffer.

      Reproducible step:
      Run "org.apache.mina.example.httpclient.Wget http://www.google.com".

      org.apache.mina.filter.codec.ProtocolDecoderException: java.lang.UnsupportedOperationException: Buffer derivation disabled. (Hexdump: empty)
      at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:176)
      at org.apache.mina.common.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:399)
      at org.apache.mina.common.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:38)
      at org.apache.mina.common.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:812)
      at org.apache.mina.common.DefaultIoFilterChain$HeadFilter.messageReceived(DefaultIoFilterChain.java:601)
      at org.apache.mina.common.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:399)
      at org.apache.mina.common.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:393)
      at org.apache.mina.common.AbstractIoProcessor.read(AbstractIoProcessor.java:348)
      at org.apache.mina.common.AbstractIoProcessor.process(AbstractIoProcessor.java:316)
      at org.apache.mina.common.AbstractIoProcessor.process(AbstractIoProcessor.java:308)
      at org.apache.mina.common.AbstractIoProcessor.access$400(AbstractIoProcessor.java:43)
      at org.apache.mina.common.AbstractIoProcessor$Worker.run(AbstractIoProcessor.java:590)
      at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
      at java.lang.Thread.run(Thread.java:613)
      Caused by: java.lang.UnsupportedOperationException: Buffer derivation disabled.
      at org.apache.mina.common.UnderivableBuffer.slice(UnderivableBuffer.java:51)
      at org.apache.mina.filter.codec.http.HttpDecoder.decodeLine(HttpDecoder.java:93)
      at org.apache.mina.filter.codec.http.HttpResponseDecoder.processContent(HttpResponseDecoder.java:165)
      at org.apache.mina.filter.codec.http.HttpResponseDecoder.doDecode(HttpResponseDecoder.java:97)
      at org.apache.mina.filter.codec.CumulativeProtocolDecoder.decode(CumulativeProtocolDecoder.java:133)
      at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:166)
      ... 15 more

      The buffer is instantiated by CumulativeProtocolDecoder.storeRemainingInSession(), but HttpDecoder tries to slice it.

        Attachments

          Activity

            People

            • Assignee:
              trustin Trustin Lee
              Reporter:
              sjlee0 Sangjin Lee
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: