HttpComponents HttpCore
  1. HttpComponents HttpCore
  2. HTTPCORE-226

java.nio.channels.IllegalSelectorException on Google Android

    Details

      Description

      The stack trace when "reactor.execute(eventDispatch)":
      04-30 03:26:01.023: ERROR/AndroidRuntime(203): java.nio.channels.IllegalSelectorException
      04-30 03:26:01.023: ERROR/AndroidRuntime(203): at java.nio.channels.spi.AbstractSelectableChannel.register(AbstractSelectableChannel.java:158)
      04-30 03:26:01.023: ERROR/AndroidRuntime(203): at java.nio.channels.SelectableChannel.register(SelectableChannel.java:158)
      04-30 03:26:01.023: ERROR/AndroidRuntime(203): at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processSessionRequests(DefaultConnectingIOReactor.java:244)
      04-30 03:26:01.023: ERROR/AndroidRuntime(203): at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:97)
      04-30 03:26:01.023: ERROR/AndroidRuntime(203): at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:317)
      04-30 03:26:01.023: ERROR/AndroidRuntime(203): at io.DownloadClient.run(DownloadClient.java:168)
      04-30 03:26:01.023: ERROR/AndroidRuntime(203): at java.lang.Thread.run(Thread.java:1096)

      The nio underlyings on Android is:
      org.apache.harmony.nio.internal.SelectorImpl
      org.apache.harmony.nio.internal.SocketChannelImpl

      Fllowing James's instruction, i tried editing (DefaultConnectingIOReactor.java:97) by changing
      key = socketChannel.register(this.selector, 0);
      to
      key = socketChannel.register(this.selector, SelectionKey.OP_CONNECT);
      but this problem persists.

      After seaching web i fount this maybe can provide some help.
      http://lists.jboss.org/pipermail/netty-users/2009-January/000221.html

      1. HTTPCORE-226.patch
        2 kB
        Oleg Kalnichevski

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Wang Yue
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development