[ https://issues.apache.org/jira/browse/DIRMINA-677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Lecharny resolved DIRMINA-677. --------------------------------------- Resolution: Fixed Fixed, I think. I have added a test in the toString() method. If the session is not connected, or closing, nothing but a warning is printed. http://svn.apache.org/viewvc?rev=756270&view=rev > AbstractIoSession sometimes throws java.lang.Error in toString() > ---------------------------------------------------------------- > > Key: DIRMINA-677 > URL: https://issues.apache.org/jira/browse/DIRMINA-677 > Project: MINA > Issue Type: Bug > Components: Core > Affects Versions: 2.0.0-M4 > Reporter: Mauritz Lovgren > Assignee: Emmanuel Lecharny > Fix For: 2.0.0-RC1 > > > Sometimes, like just after a session has been closed, e.g. due to an > IOException of some kind, the toString() often throws the given error due to > some nio internal error. > This should probably be caught by AbstractIoSession.toString() to avoid > external user error? > java.lang.Error: java.net.SocketException: Socket operation on nonsocket: > getsockname > at sun.nio.ch.Net.localAddress(Net.java:125) > at sun.nio.ch.SocketChannelImpl.localAddress(SocketChannelImpl.java:430) > at sun.nio.ch.SocketAdaptor.getLocalAddress(SocketAdaptor.java:147) > at java.net.Socket.getLocalSocketAddress(Socket.java:697) > at > org.apache.mina.transport.socket.nio.NioSocketSession.getLocalAddress(NioSocketSession.java:132) > > at > org.apache.mina.transport.socket.nio.NioSocketSession.getLocalAddress(NioSocketSession.java:47) > > at > org.apache.mina.core.session.AbstractIoSession.toString(AbstractIoSession.java:1125) > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.