fixed.
On Nov 28, 2008, at 20:44 , Survivant 00 wrote:
> I got a nice exception.. first time that I see it. It occur when I
> was using breakpoint. I don't have problem when the server run. I
> was still testing my disconnect from the client.
>
> java.lang.ClassCastException:
> com.sun.grizzly.BaseSelectionKeyHandler cannot be cast to
> com.sun.grizzly.DefaultSelectionKeyHandler
> at
> com
> .sun
> .grizzly.async.TCPAsyncQueueWriter.doWrite(TCPAsyncQueueWriter.java:
> 101)
> at
> com
> .sun
> .grizzly
> .async
> .AbstractAsyncQueueWriter.doWrite(AbstractAsyncQueueWriter.java:397)
> at
> com
> .sun
> .grizzly
> .async.AbstractAsyncQueueWriter.write(AbstractAsyncQueueWriter.java:
> 166)
> at
> com
> .sun
> .grizzly.async.TCPAsyncQueueWriter.write(TCPAsyncQueueWriter.java:77)
> at
> com
> .sun
> .grizzly
> .async.AbstractAsyncQueueWriter.write(AbstractAsyncQueueWriter.java:
> 132)
> at
> com
> .sun
> .grizzly
> .async.AbstractAsyncQueueWriter.write(AbstractAsyncQueueWriter.java:
> 123)
> at
> com
> .sun
> .grizzly
> .async.AbstractAsyncQueueWriter.write(AbstractAsyncQueueWriter.java:
> 79)
> at
> com
> .gfbn
> .quotegw
> .response
> .handler
> .QuoteFeedResponseHandler.sendToClient(QuoteFeedResponseHandler.java:
> 94)
> at
> com
> .gfbn
> .quotegw
> .response
> .handler
> .QuoteFeedResponseHandler.sendQuote(QuoteFeedResponseHandler.java:133)
> at
> com
> .gfbn
> .quotegw
> .response
> .handler
> .QuoteFeedResponseHandler
> .toolkitResponse(QuoteFeedResponseHandler.java:188)
> at com.bridge.feed.toolkit.BFRequest.fireBFToolkitEvent(Unknown
> Source)
> at com.bridge.feed.toolkit.BFToolkitDispatcher.run(Unknown Source)
> 2008-11-28 14:40:04 com.sun.grizzly.util.WorkerThreadImpl run
> GRAVE: WorkerThreadImpl unexpected exception:
>
>
> here the code in my server
>
> try {
> if(clientConnectionHandler.getKey().isValid()){
> ****(line 94)
> clientConnectionHandler
> .getSelectorHandler
> ().getAsyncQueueWriter().write(clientConnectionHandler.getKey(),
> writeBuffer);
> } else {
> // le client n'est pas connecte
> clientConnectionHandler.close();
> }
> } catch (IOException e) {
> s_logger.error("sendToClient", e);
>
> // le client n'est pas connecte
> clientConnectionHandler.close();
> }
>
>
> I got that too
>
> GRAVE: WorkerThreadImpl unexpected exception:
> java.lang.NullPointerException
> at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:322)
> at
> com
> .sun
> .grizzly.async.TCPAsyncQueueWriter.doWrite(TCPAsyncQueueWriter.java:
> 88)
> at
> com
> .sun
> .grizzly
> .async
> .AbstractAsyncQueueWriter.doWrite(AbstractAsyncQueueWriter.java:397)
> at
> com
> .sun
> .grizzly
> .async
> .AbstractAsyncQueueWriter.onWrite(AbstractAsyncQueueWriter.java:303)
> at
> com
> .sun
> .grizzly
> .async
> .AsyncQueueWriterContextTask.doCall(AsyncQueueWriterContextTask.java:
> 86)
> at
> com
> .sun
> .grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
> at
> com
> .sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:
> 335)
> at
> com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:194)