Hi guys,
did anyone have chance to look at the IllegalBlockingModeException
issue?
thanks,
Igor
On Oct 9, 2009, at 7:38 PM, Igor Minar wrote:
>
> On Oct 8, 2009, at 7:59 AM, Jeanfrancois Arcand wrote:
>
>> I think I've just fixed the
>>
>>>>>>> final ProcessorTask task = asyncExecutor.getProcessorTask();
>>>>>>> task
>>>>>>> .getSelectionKey().attach(SelectionKeyAttachment.DEREGISTERED);
>>>>>>> task.getSelectionKey().cancel();
>>
>> Try it and let me know.
>>
>> Apology for the unbelievable long delay...
>
>
> No, it still doesn't work. I get the same exceptions:
>
> INFO: Starting Grizzly Framework 1.9.19-SNAPSHOT - Fri Oct 09
> 19:20:59 PDT 2009
>
> Exception in thread "GrizzlySendfileWorker-1"
> java.nio.channels.IllegalBlockingModeException
> at
> java
> .nio
> .channels
> .spi
> .AbstractSelectableChannel
> .configureBlocking(AbstractSelectableChannel.java:257)
> at com.igorminar.grizzlysendfile.SendfileTask
> $DefaultSendfileTask.run(SendfileTask.java:131) <<<<
> socketChannel.configureBlocking(true);
> at java.util.concurrent.ThreadPoolExecutor
> $Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor
> $Worker.run(ThreadPoolExecutor.java:908)
>
> Oct 9, 2009 7:25:16 PM com.sun.grizzly.http.SelectorThread$3
> onException
> SEVERE: Exception during controller processing
> java.nio.channels.IllegalBlockingModeException
> at
> java
> .nio
> .channels
> .spi
> .AbstractSelectableChannel.register(AbstractSelectableChannel.java:
> 172)
> at
> com
> .sun
> .grizzly
> .DefaultSelectionKeyHandler.register(DefaultSelectionKeyHandler.java:
> 162)
> at
> com
> .sun
> .grizzly
> .TCPSelectorHandler.processPendingOperations(TCPSelectorHandler.java:
> 466)
> at
> com.sun.grizzly.TCPSelectorHandler.preSelect(TCPSelectorHandler.java:
> 397)
> at
> com
> .sun
> .grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.java:
> 183)
> at
> com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:
> 130)
> at java.util.concurrent.ThreadPoolExecutor
> $Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor
> $Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:637)
>
> you can just run grizzly-sendfile-server to verify if a fix works:
>
> $ java -jar target/grizzly-sendfile-server-0.3.2-SNAPSHOT-jar-with-
> dependencies.jar -a
> com.igorminar.grizzlysendfile.algorithm.EqualBlockingAlgorithm ~/tmp/
> test-files/
> $ wget localhost:8080/some-existing-file
>
>
> /i
>