You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by José Vilmar Estácio de Souza <vi...@informal.com.br> on 2012/06/19 20:48:33 UTC
WriteToClosedSessionException
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi.
Running apache mina 2.0.4 sometimes I receive the following error in
my application:
org.apache.mina.core.write.WriteToClosedSessionException
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.clearWriteRequestQueue(AbstractPollingIoProcessor.java:641)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.removeNow(AbstractPollingIoProcessor.java:592)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.removeSessions(AbstractPollingIoProcessor.java:562)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.access$800(AbstractPollingIoProcessor.java:68)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1149)
at
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
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:662)
Seems that it happens if the client sends a bunch of messages in
sequence and finishes before all answers are returned.
I use the following command to reproduce the problem my application:
cat file.txt |nc localhost 1234
The file file.txt has 149 lines.
Thanks.
{}S José Vilmar Estácio de Souza
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJP4Ml5AAoJEPMEywZ3KXznYK0IAKXviY4hxMMintuIiZQWUtfU
fSecGfTNcpGf/7eG7NtQ0a0FXnUMIFd5LTTi4aAgYMQjYdUDoi4hl+uWuZ93lSp4
3sM2a+HgenTUC32zAvJig9hXr0ioxP2vk5kFDrqTg+zYn/CriBuF+TWqD0U5T72V
0EM7zaWbMS21r7DJ7YEXktkzTH0RTnL1DjvMnzfgbf4WCjj7ix/KBAr/ituepi53
eVsmQ3cg/yjv2Detm89Ht0kgcLDSCrALXvvlCSmKgwWJTiIHJ+Eb3bElU+A3r3VC
RviK7Xqy3/SYjM3RevR9FoCUAv3GHgEgdEg5cIxpcRPOaI/4zFSNZosMU30gMAU=
=6kab
-----END PGP SIGNATURE-----
Re: WriteToClosedSessionException
Posted by José Vilmar Estácio de Souza <vi...@informal.com.br>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi.
On 06/20/2012 12:14 AM, Emmanuel Lécharny wrote:
> Le 6/19/12 8:48 PM, José Vilmar Estácio de Souza a écrit : Which is
> absolutely normal.
>
> If your client just disconnect before the server can send the
> response, then the server will throw such an exception.
>
> Is that a problem ?
>
>
There are really no problems.
I thought the error would not happen because before executing the
method session.write, I was invoking the method session.isclosing.
After reading the documentation, I discovered that the method
session.write runs asynchronously.
Thanks.
- --
{}S José Vilmar Estácio de Souza
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJP4bRxAAoJEPMEywZ3KXznV94IALPdnNiTL8edAOM3RtvqP9O0
PilpZL3TtNhx+CUEtTrx9GEKrez1VVDysAl1tJFjFd4q2uhbmXWkWPcMjrbmTy9k
OLY344ZRNEhFk1ArOScAUCs/r94pyDxphJH7yStt+ueDP72yqR6b4pjWaKz9JQvy
/y8fMTycLxIo7Gf/HJZHgA01zf7hjVNk0gRZThSf/bb2whVnjSVsPOhndlWRwRd2
SziuxQrZL6C0KFBaULCtslI4pcM+zEA7B+M4+3bkEEWsKmfgbI4a8btIvtfRej18
XXSZNgvOq1Cq2cY9HDQAkvzt0aVciydZo3dww0dMX4fv/iULZvRc7ke2xWQnL6k=
=a3dw
-----END PGP SIGNATURE-----
Re: WriteToClosedSessionException
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 6/19/12 8:48 PM, José Vilmar Estácio de Souza a écrit :
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi.
> Running apache mina 2.0.4 sometimes I receive the following error in
> my application:
Which is absolutely normal.
If your client just disconnect before the server can send the response,
then the server will throw such an exception.
Is that a problem ?
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com