mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Michelberger (JIRA) <j...@apache.org>
Subject [jira] Commented: (DIRMINA-771) Calling NioSocketSession.toString() causes java.lang.Error
Date Fri, 11 Feb 2011 08:22:57 GMT

    [ https://issues.apache.org/jira/browse/DIRMINA-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12993384#comment-12993384
] 

Jörg Michelberger commented on DIRMINA-771:
-------------------------------------------

One more:
java.lang.Error: java.net.SocketException: Socket operation on nonsocket: getsockname

	at sun.nio.ch.Net.localAddress(Net.java:128)

	at sun.nio.ch.SocketChannelImpl.localAddress(SocketChannelImpl.java:423)

	at sun.nio.ch.SocketAdaptor.getLocalAddress(SocketAdaptor.java:147)

	at java.net.Socket.getLocalSocketAddress(Socket.java:717)

	at org.apache.mina.transport.socket.nio.NioSocketSession.getLocalAddress(NioSocketSession.java:112)

	at org.apache.mina.transport.socket.nio.NioSocketSession.getLocalAddress(NioSocketSession.java:43)

	at org.apache.mina.core.session.AbstractIoSession.toString(AbstractIoSession.java:1201)

	at java.lang.String.valueOf(String.java:2826)

	at java.lang.StringBuilder.append(StringBuilder.java:115)

	at com.ndsatcom.cecsdatamodel.cecsclient.newmulti.mina.IoSessionUtil.toString(IoSessionUtil.java:36)

	at com.ndsatcom.cecsdatamodel.cecsclient.newmulti.mina.KeepAliveFilter.resetStatus(KeepAliveFilter.java:271)

	at com.ndsatcom.cecsdatamodel.cecsclient.newmulti.mina.KeepAliveFilter.onPostRemove(KeepAliveFilter.java:142)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain.deregister(DefaultIoFilterChain.java:309)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain.clear(DefaultIoFilterChain.java:264)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.sessionClosed(DefaultIoFilterChain.java:675)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionClosed(DefaultIoFilterChain.java:395)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$900(DefaultIoFilterChain.java:46)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.sessionClosed(DefaultIoFilterChain.java:781)

	at org.apache.mina.core.filterchain.IoFilterAdapter.sessionClosed(IoFilterAdapter.java:95)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionClosed(DefaultIoFilterChain.java:395)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$900(DefaultIoFilterChain.java:46)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.sessionClosed(DefaultIoFilterChain.java:781)

	at org.apache.mina.core.filterchain.IoFilterAdapter.sessionClosed(IoFilterAdapter.java:95)

	at com.ndsatcom.cecsdatamodel.cecsclient.newmulti.mina.ThroughputCounterFilter.sessionClosed(ThroughputCounterFilter.java:28)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionClosed(DefaultIoFilterChain.java:395)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$900(DefaultIoFilterChain.java:46)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.sessionClosed(DefaultIoFilterChain.java:781)

	at org.apache.mina.filter.codec.ProtocolCodecFilter.sessionClosed(ProtocolCodecFilter.java:387)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionClosed(DefaultIoFilterChain.java:395)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$900(DefaultIoFilterChain.java:46)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.sessionClosed(DefaultIoFilterChain.java:781)

	at org.apache.mina.core.filterchain.IoFilterAdapter.sessionClosed(IoFilterAdapter.java:95)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionClosed(DefaultIoFilterChain.java:395)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$900(DefaultIoFilterChain.java:46)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.sessionClosed(DefaultIoFilterChain.java:781)

	at org.apache.mina.core.filterchain.IoFilterAdapter.sessionClosed(IoFilterAdapter.java:95)

	at com.ndsatcom.cecsdatamodel.cecsclient.newmulti.mina.ConnectionLoggingFilter.sessionClosed(ConnectionLoggingFilter.java:48)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionClosed(DefaultIoFilterChain.java:395)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$900(DefaultIoFilterChain.java:46)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.sessionClosed(DefaultIoFilterChain.java:781)

	at org.apache.mina.core.filterchain.IoFilterAdapter.sessionClosed(IoFilterAdapter.java:95)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionClosed(DefaultIoFilterChain.java:395)

	at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireSessionClosed(DefaultIoFilterChain.java:388)

	at org.apache.mina.core.service.IoServiceListenerSupport.fireSessionDestroyed(IoServiceListenerSupport.java:244)

	at org.apache.mina.core.polling.AbstractPollingIoProcessor.removeNow(AbstractPollingIoProcessor.java:580)

	at org.apache.mina.core.polling.AbstractPollingIoProcessor.removeSessions(AbstractPollingIoProcessor.java:540)

	at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:67)

	at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1087)

	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)

Caused by: java.net.SocketException: Socket operation on nonsocket: getsockname

	at sun.nio.ch.Net.localInetAddress(Native Method)

	at sun.nio.ch.Net.localAddress(Net.java:125)

	... 51 more



> Calling NioSocketSession.toString() causes java.lang.Error
> ----------------------------------------------------------
>
>                 Key: DIRMINA-771
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-771
>             Project: MINA
>          Issue Type: Bug
>    Affects Versions: 2.0.0-RC1
>         Environment: WinXP JDK 1.6.1_18
>            Reporter: Jörg Michelberger
>            Priority: Critical
>             Fix For: 2.0.2
>
>
> Hi there,
> using MINA 2.0.0 RC1 and have a log statement in my IOHandler.exceptionCaught() method
plugged on top of a NioSocketSession.
> The log statement calls toString() on the IoSession passed in. In some cases I get the
appended Exception.
> Thats not good.
> Regards Jörg
> 2010-03-03 09:51:46,818 WARN  [NioProcessor-2] filterchain.DefaultIoFilterChain::callNextExceptionCaught()
(DefaultIoFilterChain.java:483) - Unexpected exception from exceptionCaught handler. 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:703)
>  	at org.apache.mina.transport.socket.nio.NioSocketSession.getLocalAddress(NioSocketSession.java:158)
>  	at org.apache.mina.transport.socket.nio.NioSocketSession.getLocalAddress(NioSocketSession.java:47)
>  	at org.apache.mina.core.session.AbstractIoSession.toString(AbstractIoSession.java:1139)
>  	at com.ndsatcom.cecsdatamodel.cecsclient.newmulti.mina.MinaCecsIoHandler.exceptionCaught(MinaCecsIoHandler.java:33)
>  	at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.exceptionCaught(DefaultIoFilterChain.java:694)
>  	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextExceptionCaught(DefaultIoFilterChain.java:480)
>  	at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1100(DefaultIoFilterChain.java:46)
>  	at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.exceptionCaught(DefaultIoFilterChain.java:788)
>  	at org.apache.mina.core.filterchain.IoFilterAdapter.exceptionCaught(IoFilterAdapter.java:111)
>  	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextExceptionCaught(DefaultIoFilterChain.java:480)
>  	at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireExceptionCaught(DefaultIoFilterChain.java:468)
>  	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionClosed(DefaultIoFilterChain.java:397)
>  	at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$900(DefaultIoFilterChain.java:46)
>  	at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.sessionClosed(DefaultIoFilterChain.java:778)
>  	at org.apache.mina.core.filterchain.IoFilterAdapter.sessionClosed(IoFilterAdapter.java:95)
>  	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionClosed(DefaultIoFilterChain.java:395)
>  	at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$900(DefaultIoFilterChain.java:46)
>  	at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.sessionClosed(DefaultIoFilterChain.java:778)
>  	at org.apache.mina.filter.codec.ProtocolCodecFilter.sessionClosed(ProtocolCodecFilter.java:345)
>  	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionClosed(DefaultIoFilterChain.java:395)
>  	at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$900(DefaultIoFilterChain.java:46)
>  	at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.sessionClosed(DefaultIoFilterChain.java:778)
>  	at org.apache.mina.core.filterchain.IoFilterAdapter.sessionClosed(IoFilterAdapter.java:95)
>  	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionClosed(DefaultIoFilterChain.java:395)
>  	at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireSessionClosed(DefaultIoFilterChain.java:388)
>  	at org.apache.mina.core.service.IoServiceListenerSupport.fireSessionDestroyed(IoServiceListenerSupport.java:210)
>  	at org.apache.mina.core.polling.AbstractPollingIoProcessor.removeNow(AbstractPollingIoProcessor.java:535)
>  	at org.apache.mina.core.polling.AbstractPollingIoProcessor.removeSessions(AbstractPollingIoProcessor.java:497)
>  	at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:61)
>  	at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:974)
>  	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:619)
>  Caused by: java.net.SocketException: Socket operation on nonsocket: getsockname
>  	at sun.nio.ch.Net.localInetAddress(Native Method)
>  	at sun.nio.ch.Net.localAddress(Net.java:122) 	... 37 more

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message