Hi DCSReply,

On 9/26/07, dcsepely <[EMAIL PROTECTED]> wrote:
>
> I've written a simple datagram broadcast sender application using Mina 1.1.2.
> It works correctly but after ~1 minute the IoSession.write() always throws
> an org.apache.mina.common.RuntimeIOException exception. There is exactly one
> IoSession instance during the application lifecycle.
>
> The full stacktrace is shown bellow:
>
> org.apache.mina.common.RuntimeIOException: java.net.SocketException: Socket
> operation on nonsocket: sun.nio.ch.Net.setIntOption
>         at
> org.apache.mina.transport.socket.nio.support.DatagramSessionImpl$SessionConfigImpl.isBroadcast(DatagramSessionImpl.java:262)
>         at
> org.apache.mina.transport.socket.nio.support.DatagramSessionImpl.write(DatagramSessionImpl.java:163)
>         at
> org.apache.mina.common.support.BaseIoSession.write(BaseIoSession.java:136)
>         at
> hu.infomatix.mango.ox.daemon.mail.test.DatagramBroadcastSender.main(DatagramBroadcastSender.java:65)
> Caused by: java.net.SocketException: Socket operation on nonsocket:
> sun.nio.ch.Net.setIntOption
>         at sun.nio.ch.Net.getIntOption0(Native Method)
>         at sun.nio.ch.Net.getIntOption(Unknown Source)
>         at sun.nio.ch.DatagramChannelImpl$1.getInt(Unknown Source)
>         at sun.nio.ch.SocketOptsImpl.getBoolean(Unknown Source)
>         at sun.nio.ch.SocketOptsImpl.broadcast(Unknown Source)
>         at sun.nio.ch.OptionAdaptor.getBroadcast(Unknown Source)
>         at sun.nio.ch.DatagramSocketAdaptor.getBroadcast(Unknown Source)
>         at
> org.apache.mina.transport.socket.nio.support.DatagramSessionImpl$SessionConfigImpl.isBroadcast(DatagramSessionImpl.java:260)
>         ... 3 more
>
> How could i get rid of this error?
>
> Thanks in advance for your answers.

What operating system do you use?  On what address did you bind?  In
most operating systems, you have to bind on 0.0.0.0 like the
following:

acceptor.bind(new InetSocketAddress(8080), ...);

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Reply via email to