FYI,
I've discovered that this problem is due to a bug with Sun's JRE on Windows:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6230761
I also get this exception on a FreeBSD VMWare running on Windows. However,
it seems to bind fine on Linux, and I'm sure it's okay on Solaris.
Regards,
Greg
agrabil wrote:
>
> Using MINA 2.0, I cannot seem to create and bind to the local IPv6
> wildcard address:
>
> org.apache.mina.transport.socket.nio.NioDatagramAcceptor acceptor =
> new org.apache.mina.transport.socket.nio.NioDatagramAcceptor();
> acceptor.setDefaultLocalAddress(new java.net.InetSocketAddress("::0",
> 555));
> acceptor.setHandler(new org.apache.mina.common.IoHandlerAdapter());
> acceptor.bind();
>
> java.net.SocketException: Address family not supported by protocol family:
> bind
> at sun.nio.ch.Net.bind(Native Method)
> at sun.nio.ch.DatagramChannelImpl.bind(DatagramChannelImpl.java:495)
> at sun.nio.ch.DatagramSocketAdaptor.bind(DatagramSocketAdaptor.java:79)
> at
> org.apache.mina.transport.socket.nio.NioDatagramAcceptor.open(NioDatagramAcceptor.java:117)
> at
> org.apache.mina.transport.socket.nio.NioDatagramAcceptor.open(NioDatagramAcceptor.java:46)
> at
> org.apache.mina.common.AbstractPollingConnectionlessIoAcceptor.registerHandles(AbstractPollingConnectionlessIoAcceptor.java:505)
> at
> org.apache.mina.common.AbstractPollingConnectionlessIoAcceptor.access$500(AbstractPollingConnectionlessIoAcceptor.java:48)
> at
> org.apache.mina.common.AbstractPollingConnectionlessIoAcceptor$Worker.run(AbstractPollingConnectionlessIoAcceptor.java:334)
> at
> org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
>
> Is this something that is supposed to work, or is this not available in
> MINA?
>
> Regards,
> Greg
>
--
View this message in context:
http://www.nabble.com/MINA-2.0-IPv6-NioDatagramAcceptor-tp15282319s16868p15302866.html
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.