You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Simon Temple (JIRA)" <ji...@apache.org> on 2006/04/04 16:35:57 UTC

[jira] Created: (DIRMINA-200) IBM iSeries throws unexpected SocketException

IBM iSeries throws unexpected SocketException
---------------------------------------------

         Key: DIRMINA-200
         URL: http://issues.apache.org/jira/browse/DIRMINA-200
     Project: Directory MINA
        Type: Bug

    Versions: 0.9.3    
 Environment: mina-0.9.3  JDK 1.4.2  IBM iSeries OS/400 V5R2
    Reporter: Simon Temple
    Priority: Blocker
 Attachments: mina-ex.patch

Proposal of a change to nio SocketSessionImpl.

I'd like the calls to:

	getTrafficClass
	setTrafficClass
	setSendBufferSize
	setReceiveBufferSize

to not throw RuntimeIOException when a SocketException is caught.

My reasoning is based on the Socket class javadoc:

E.g.  setTrafficClass

"As the underlying network implementation may ignore this value applications should consider it a hint."

and

"Setting bits in the precedence field may result in a SocketException indicating that the operation is not permitted."


The other getter/setter method javadoc also refer to 'hints' and a 'if there is an error obtaining' condition.

Some operating systems (OS/400 in my case ;-) ), do not allow the trafficClass value to be read or written.  I think this may also be the case as reported here on Linux:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4709474

By ignoring the SocketException thrown by these methods (perhaps issuing a log4j WARN instead?  Or hooking up with an appropriate monitor?), socket sessions can be established without error on an IBM iSeries.

Example stack trace:

2006-04-03 17:26:26,343 WARN  [org.apache.mina.common.support.DefaultExceptionMonitor](SocketAcceptor-0) Unexpected exception.
org.apache.mina.common.RuntimeIOException: java.net.SocketException
	at java.lang.Throwable.<init>(Throwable.java:240)
	at java.lang.Exception.<init>(Exception.java:77)
	at java.lang.RuntimeException.<init>(RuntimeException.java:77)
	at org.apache.mina.common.RuntimeIOException.<init>(RuntimeIOException.java:48)
	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl$SocketSessionConfigImpl.setTrafficClass(SocketSessionImpl.java:342)
	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl.<init>(SocketSessionImpl.java:71)
	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.processSessions(SocketAcceptorDelegate.java:379)
	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.run(SocketAcceptorDelegate.java:326)
Caused by: java.net.SocketException
	at java.lang.Throwable.<init>(Throwable.java:180)
	at java.lang.Exception.<init>(Exception.java:29)
	at java.io.IOException.<init>(IOException.java:28)
	at java.net.SocketException.<init>(SocketException.java:35)
	at sun.nio.ch.Net.setIntOption(Net.java:156)
	at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:398)
	at sun.nio.ch.SocketOptsImpl.setInt(SocketOptsImpl.java:46)
	at sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:249)
	at sun.nio.ch.OptionAdaptor.setTrafficClass(OptionAdaptor.java:158)
	at sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:320)
	... 4 more

I have attached a proposed patch and welcome any comments.

SimonT


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRMINA-200) IBM iSeries throws unexpected SocketException

Posted by "Simon Temple (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRMINA-200?page=comments#action_12416726 ] 

Simon Temple commented on DIRMINA-200:
--------------------------------------

Sorry for the delay Trustin...

We just upgraded our production systems to 0.9.4 release and noticed the patch was not included.

I realise it is my fault for not getting back to you... sorry.

Could you patch the current trunk so we can work towards a fix in your next release?

Thanks

SimonT

> IBM iSeries throws unexpected SocketException
> ---------------------------------------------
>
>          Key: DIRMINA-200
>          URL: http://issues.apache.org/jira/browse/DIRMINA-200
>      Project: Directory MINA
>         Type: Bug

>     Versions: 0.9.3
>  Environment: mina-0.9.3  JDK 1.4.2  IBM iSeries OS/400 V5R2
>     Reporter: Simon Temple
>     Assignee: Trustin Lee
>     Priority: Blocker
>      Fix For: 0.9.4
>  Attachments: mina-ex.patch
>
> Proposal of a change to nio SocketSessionImpl.
> I'd like the calls to:
> 	getTrafficClass
> 	setTrafficClass
> 	setSendBufferSize
> 	setReceiveBufferSize
> to not throw RuntimeIOException when a SocketException is caught.
> My reasoning is based on the Socket class javadoc:
> E.g.  setTrafficClass
> "As the underlying network implementation may ignore this value applications should consider it a hint."
> and
> "Setting bits in the precedence field may result in a SocketException indicating that the operation is not permitted."
> The other getter/setter method javadoc also refer to 'hints' and a 'if there is an error obtaining' condition.
> Some operating systems (OS/400 in my case ;-) ), do not allow the trafficClass value to be read or written.  I think this may also be the case as reported here on Linux:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4709474
> By ignoring the SocketException thrown by these methods (perhaps issuing a log4j WARN instead?  Or hooking up with an appropriate monitor?), socket sessions can be established without error on an IBM iSeries.
> Example stack trace:
> 2006-04-03 17:26:26,343 WARN  [org.apache.mina.common.support.DefaultExceptionMonitor](SocketAcceptor-0) Unexpected exception.
> org.apache.mina.common.RuntimeIOException: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:240)
> 	at java.lang.Exception.<init>(Exception.java:77)
> 	at java.lang.RuntimeException.<init>(RuntimeException.java:77)
> 	at org.apache.mina.common.RuntimeIOException.<init>(RuntimeIOException.java:48)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl$SocketSessionConfigImpl.setTrafficClass(SocketSessionImpl.java:342)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl.<init>(SocketSessionImpl.java:71)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.processSessions(SocketAcceptorDelegate.java:379)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.run(SocketAcceptorDelegate.java:326)
> Caused by: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:180)
> 	at java.lang.Exception.<init>(Exception.java:29)
> 	at java.io.IOException.<init>(IOException.java:28)
> 	at java.net.SocketException.<init>(SocketException.java:35)
> 	at sun.nio.ch.Net.setIntOption(Net.java:156)
> 	at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:398)
> 	at sun.nio.ch.SocketOptsImpl.setInt(SocketOptsImpl.java:46)
> 	at sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:249)
> 	at sun.nio.ch.OptionAdaptor.setTrafficClass(OptionAdaptor.java:158)
> 	at sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:320)
> 	... 4 more
> I have attached a proposed patch and welcome any comments.
> SimonT

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRMINA-200) IBM iSeries throws unexpected SocketException

Posted by "Simon Temple (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRMINA-200?page=comments#action_12374314 ] 

Simon Temple commented on DIRMINA-200:
--------------------------------------

We're using MINA via DS RC1.  If returning false does not cause the socket connection to be rejected then your suggestion is fine.

I think the 'four methods' may occur in other classes: DatagramSessionImpl.java, for example.

It may be best to grep the whole source tree for occurences...?

> IBM iSeries throws unexpected SocketException
> ---------------------------------------------
>
>          Key: DIRMINA-200
>          URL: http://issues.apache.org/jira/browse/DIRMINA-200
>      Project: Directory MINA
>         Type: Bug

>     Versions: 0.9.3
>  Environment: mina-0.9.3  JDK 1.4.2  IBM iSeries OS/400 V5R2
>     Reporter: Simon Temple
>     Priority: Blocker
>  Attachments: mina-ex.patch
>
> Proposal of a change to nio SocketSessionImpl.
> I'd like the calls to:
> 	getTrafficClass
> 	setTrafficClass
> 	setSendBufferSize
> 	setReceiveBufferSize
> to not throw RuntimeIOException when a SocketException is caught.
> My reasoning is based on the Socket class javadoc:
> E.g.  setTrafficClass
> "As the underlying network implementation may ignore this value applications should consider it a hint."
> and
> "Setting bits in the precedence field may result in a SocketException indicating that the operation is not permitted."
> The other getter/setter method javadoc also refer to 'hints' and a 'if there is an error obtaining' condition.
> Some operating systems (OS/400 in my case ;-) ), do not allow the trafficClass value to be read or written.  I think this may also be the case as reported here on Linux:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4709474
> By ignoring the SocketException thrown by these methods (perhaps issuing a log4j WARN instead?  Or hooking up with an appropriate monitor?), socket sessions can be established without error on an IBM iSeries.
> Example stack trace:
> 2006-04-03 17:26:26,343 WARN  [org.apache.mina.common.support.DefaultExceptionMonitor](SocketAcceptor-0) Unexpected exception.
> org.apache.mina.common.RuntimeIOException: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:240)
> 	at java.lang.Exception.<init>(Exception.java:77)
> 	at java.lang.RuntimeException.<init>(RuntimeException.java:77)
> 	at org.apache.mina.common.RuntimeIOException.<init>(RuntimeIOException.java:48)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl$SocketSessionConfigImpl.setTrafficClass(SocketSessionImpl.java:342)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl.<init>(SocketSessionImpl.java:71)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.processSessions(SocketAcceptorDelegate.java:379)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.run(SocketAcceptorDelegate.java:326)
> Caused by: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:180)
> 	at java.lang.Exception.<init>(Exception.java:29)
> 	at java.io.IOException.<init>(IOException.java:28)
> 	at java.net.SocketException.<init>(SocketException.java:35)
> 	at sun.nio.ch.Net.setIntOption(Net.java:156)
> 	at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:398)
> 	at sun.nio.ch.SocketOptsImpl.setInt(SocketOptsImpl.java:46)
> 	at sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:249)
> 	at sun.nio.ch.OptionAdaptor.setTrafficClass(OptionAdaptor.java:158)
> 	at sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:320)
> 	... 4 more
> I have attached a proposed patch and welcome any comments.
> SimonT

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRMINA-200) IBM iSeries throws unexpected SocketException

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRMINA-200?page=comments#action_12416729 ] 

Trustin Lee commented on DIRMINA-200:
-------------------------------------

Well, I fixed this issue AFAIK though I didn't apply your patch directly.  Here's the change I've made:

http://svn.apache.org/viewvc?view=rev&revision=394852

Did you try to run with 0.9.4?  If it didn't work, please try with the trunk.  It should work fine.  Otherwise, please reopen this issue.

> IBM iSeries throws unexpected SocketException
> ---------------------------------------------
>
>          Key: DIRMINA-200
>          URL: http://issues.apache.org/jira/browse/DIRMINA-200
>      Project: Directory MINA
>         Type: Bug

>     Versions: 0.9.3
>  Environment: mina-0.9.3  JDK 1.4.2  IBM iSeries OS/400 V5R2
>     Reporter: Simon Temple
>     Assignee: Trustin Lee
>     Priority: Blocker
>      Fix For: 0.9.4
>  Attachments: mina-ex.patch
>
> Proposal of a change to nio SocketSessionImpl.
> I'd like the calls to:
> 	getTrafficClass
> 	setTrafficClass
> 	setSendBufferSize
> 	setReceiveBufferSize
> to not throw RuntimeIOException when a SocketException is caught.
> My reasoning is based on the Socket class javadoc:
> E.g.  setTrafficClass
> "As the underlying network implementation may ignore this value applications should consider it a hint."
> and
> "Setting bits in the precedence field may result in a SocketException indicating that the operation is not permitted."
> The other getter/setter method javadoc also refer to 'hints' and a 'if there is an error obtaining' condition.
> Some operating systems (OS/400 in my case ;-) ), do not allow the trafficClass value to be read or written.  I think this may also be the case as reported here on Linux:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4709474
> By ignoring the SocketException thrown by these methods (perhaps issuing a log4j WARN instead?  Or hooking up with an appropriate monitor?), socket sessions can be established without error on an IBM iSeries.
> Example stack trace:
> 2006-04-03 17:26:26,343 WARN  [org.apache.mina.common.support.DefaultExceptionMonitor](SocketAcceptor-0) Unexpected exception.
> org.apache.mina.common.RuntimeIOException: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:240)
> 	at java.lang.Exception.<init>(Exception.java:77)
> 	at java.lang.RuntimeException.<init>(RuntimeException.java:77)
> 	at org.apache.mina.common.RuntimeIOException.<init>(RuntimeIOException.java:48)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl$SocketSessionConfigImpl.setTrafficClass(SocketSessionImpl.java:342)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl.<init>(SocketSessionImpl.java:71)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.processSessions(SocketAcceptorDelegate.java:379)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.run(SocketAcceptorDelegate.java:326)
> Caused by: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:180)
> 	at java.lang.Exception.<init>(Exception.java:29)
> 	at java.io.IOException.<init>(IOException.java:28)
> 	at java.net.SocketException.<init>(SocketException.java:35)
> 	at sun.nio.ch.Net.setIntOption(Net.java:156)
> 	at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:398)
> 	at sun.nio.ch.SocketOptsImpl.setInt(SocketOptsImpl.java:46)
> 	at sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:249)
> 	at sun.nio.ch.OptionAdaptor.setTrafficClass(OptionAdaptor.java:158)
> 	at sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:320)
> 	... 4 more
> I have attached a proposed patch and welcome any comments.
> SimonT

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRMINA-200) IBM iSeries throws unexpected SocketException

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRMINA-200?page=comments#action_12417223 ] 

Trustin Lee commented on DIRMINA-200:
-------------------------------------

SocketAcceptor/ConnectorDelegate has been replaced with SocketAcceptor/Connector in 0.9.5.  Unfortunately, you'll have to patch it manually for now though the next RC of ApacheDS will use MINA 0.9.5 or above.

The following URL shows all changes made for this issue:

http://issues.apache.org/jira/browse/DIRMINA-200?page=com.atlassian.jira.plugin.ext.subversion:subversion-commits-tabpanel

> IBM iSeries throws unexpected SocketException
> ---------------------------------------------
>
>          Key: DIRMINA-200
>          URL: http://issues.apache.org/jira/browse/DIRMINA-200
>      Project: Directory MINA
>         Type: Bug

>     Versions: 0.9.3
>  Environment: mina-0.9.3  JDK 1.4.2  IBM iSeries OS/400 V5R2
>     Reporter: Simon Temple
>     Assignee: Trustin Lee
>     Priority: Blocker
>      Fix For: 0.9.4
>  Attachments: mina-ex.patch
>
> Proposal of a change to nio SocketSessionImpl.
> I'd like the calls to:
> 	getTrafficClass
> 	setTrafficClass
> 	setSendBufferSize
> 	setReceiveBufferSize
> to not throw RuntimeIOException when a SocketException is caught.
> My reasoning is based on the Socket class javadoc:
> E.g.  setTrafficClass
> "As the underlying network implementation may ignore this value applications should consider it a hint."
> and
> "Setting bits in the precedence field may result in a SocketException indicating that the operation is not permitted."
> The other getter/setter method javadoc also refer to 'hints' and a 'if there is an error obtaining' condition.
> Some operating systems (OS/400 in my case ;-) ), do not allow the trafficClass value to be read or written.  I think this may also be the case as reported here on Linux:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4709474
> By ignoring the SocketException thrown by these methods (perhaps issuing a log4j WARN instead?  Or hooking up with an appropriate monitor?), socket sessions can be established without error on an IBM iSeries.
> Example stack trace:
> 2006-04-03 17:26:26,343 WARN  [org.apache.mina.common.support.DefaultExceptionMonitor](SocketAcceptor-0) Unexpected exception.
> org.apache.mina.common.RuntimeIOException: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:240)
> 	at java.lang.Exception.<init>(Exception.java:77)
> 	at java.lang.RuntimeException.<init>(RuntimeException.java:77)
> 	at org.apache.mina.common.RuntimeIOException.<init>(RuntimeIOException.java:48)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl$SocketSessionConfigImpl.setTrafficClass(SocketSessionImpl.java:342)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl.<init>(SocketSessionImpl.java:71)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.processSessions(SocketAcceptorDelegate.java:379)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.run(SocketAcceptorDelegate.java:326)
> Caused by: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:180)
> 	at java.lang.Exception.<init>(Exception.java:29)
> 	at java.io.IOException.<init>(IOException.java:28)
> 	at java.net.SocketException.<init>(SocketException.java:35)
> 	at sun.nio.ch.Net.setIntOption(Net.java:156)
> 	at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:398)
> 	at sun.nio.ch.SocketOptsImpl.setInt(SocketOptsImpl.java:46)
> 	at sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:249)
> 	at sun.nio.ch.OptionAdaptor.setTrafficClass(OptionAdaptor.java:158)
> 	at sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:320)
> 	... 4 more
> I have attached a proposed patch and welcome any comments.
> SimonT

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRMINA-200) IBM iSeries throws unexpected SocketException

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRMINA-200?page=comments#action_12417225 ] 

Trustin Lee commented on DIRMINA-200:
-------------------------------------

(X) Please lt me any other missing files.
(O) Please let me know any other missing files.

Sorry for flooding comments!


> IBM iSeries throws unexpected SocketException
> ---------------------------------------------
>
>          Key: DIRMINA-200
>          URL: http://issues.apache.org/jira/browse/DIRMINA-200
>      Project: Directory MINA
>         Type: Bug

>     Versions: 0.9.3, 0.9.4
>  Environment: mina-0.9.3  JDK 1.4.2  IBM iSeries OS/400 V5R2
>     Reporter: Simon Temple
>     Assignee: Trustin Lee
>     Priority: Blocker
>      Fix For: 0.9.5
>  Attachments: mina-ex.patch
>
> Proposal of a change to nio SocketSessionImpl.
> I'd like the calls to:
> 	getTrafficClass
> 	setTrafficClass
> 	setSendBufferSize
> 	setReceiveBufferSize
> to not throw RuntimeIOException when a SocketException is caught.
> My reasoning is based on the Socket class javadoc:
> E.g.  setTrafficClass
> "As the underlying network implementation may ignore this value applications should consider it a hint."
> and
> "Setting bits in the precedence field may result in a SocketException indicating that the operation is not permitted."
> The other getter/setter method javadoc also refer to 'hints' and a 'if there is an error obtaining' condition.
> Some operating systems (OS/400 in my case ;-) ), do not allow the trafficClass value to be read or written.  I think this may also be the case as reported here on Linux:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4709474
> By ignoring the SocketException thrown by these methods (perhaps issuing a log4j WARN instead?  Or hooking up with an appropriate monitor?), socket sessions can be established without error on an IBM iSeries.
> Example stack trace:
> 2006-04-03 17:26:26,343 WARN  [org.apache.mina.common.support.DefaultExceptionMonitor](SocketAcceptor-0) Unexpected exception.
> org.apache.mina.common.RuntimeIOException: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:240)
> 	at java.lang.Exception.<init>(Exception.java:77)
> 	at java.lang.RuntimeException.<init>(RuntimeException.java:77)
> 	at org.apache.mina.common.RuntimeIOException.<init>(RuntimeIOException.java:48)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl$SocketSessionConfigImpl.setTrafficClass(SocketSessionImpl.java:342)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl.<init>(SocketSessionImpl.java:71)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.processSessions(SocketAcceptorDelegate.java:379)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.run(SocketAcceptorDelegate.java:326)
> Caused by: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:180)
> 	at java.lang.Exception.<init>(Exception.java:29)
> 	at java.io.IOException.<init>(IOException.java:28)
> 	at java.net.SocketException.<init>(SocketException.java:35)
> 	at sun.nio.ch.Net.setIntOption(Net.java:156)
> 	at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:398)
> 	at sun.nio.ch.SocketOptsImpl.setInt(SocketOptsImpl.java:46)
> 	at sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:249)
> 	at sun.nio.ch.OptionAdaptor.setTrafficClass(OptionAdaptor.java:158)
> 	at sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:320)
> 	... 4 more
> I have attached a proposed patch and welcome any comments.
> SimonT

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRMINA-200) IBM iSeries throws unexpected SocketException

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRMINA-200?page=comments#action_12417014 ] 

Trustin Lee commented on DIRMINA-200:
-------------------------------------

I checked in the candidate for fixing this issue.  Simon, could you try again with the trunk?

> IBM iSeries throws unexpected SocketException
> ---------------------------------------------
>
>          Key: DIRMINA-200
>          URL: http://issues.apache.org/jira/browse/DIRMINA-200
>      Project: Directory MINA
>         Type: Bug

>     Versions: 0.9.3
>  Environment: mina-0.9.3  JDK 1.4.2  IBM iSeries OS/400 V5R2
>     Reporter: Simon Temple
>     Assignee: Trustin Lee
>     Priority: Blocker
>      Fix For: 0.9.4
>  Attachments: mina-ex.patch
>
> Proposal of a change to nio SocketSessionImpl.
> I'd like the calls to:
> 	getTrafficClass
> 	setTrafficClass
> 	setSendBufferSize
> 	setReceiveBufferSize
> to not throw RuntimeIOException when a SocketException is caught.
> My reasoning is based on the Socket class javadoc:
> E.g.  setTrafficClass
> "As the underlying network implementation may ignore this value applications should consider it a hint."
> and
> "Setting bits in the precedence field may result in a SocketException indicating that the operation is not permitted."
> The other getter/setter method javadoc also refer to 'hints' and a 'if there is an error obtaining' condition.
> Some operating systems (OS/400 in my case ;-) ), do not allow the trafficClass value to be read or written.  I think this may also be the case as reported here on Linux:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4709474
> By ignoring the SocketException thrown by these methods (perhaps issuing a log4j WARN instead?  Or hooking up with an appropriate monitor?), socket sessions can be established without error on an IBM iSeries.
> Example stack trace:
> 2006-04-03 17:26:26,343 WARN  [org.apache.mina.common.support.DefaultExceptionMonitor](SocketAcceptor-0) Unexpected exception.
> org.apache.mina.common.RuntimeIOException: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:240)
> 	at java.lang.Exception.<init>(Exception.java:77)
> 	at java.lang.RuntimeException.<init>(RuntimeException.java:77)
> 	at org.apache.mina.common.RuntimeIOException.<init>(RuntimeIOException.java:48)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl$SocketSessionConfigImpl.setTrafficClass(SocketSessionImpl.java:342)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl.<init>(SocketSessionImpl.java:71)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.processSessions(SocketAcceptorDelegate.java:379)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.run(SocketAcceptorDelegate.java:326)
> Caused by: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:180)
> 	at java.lang.Exception.<init>(Exception.java:29)
> 	at java.io.IOException.<init>(IOException.java:28)
> 	at java.net.SocketException.<init>(SocketException.java:35)
> 	at sun.nio.ch.Net.setIntOption(Net.java:156)
> 	at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:398)
> 	at sun.nio.ch.SocketOptsImpl.setInt(SocketOptsImpl.java:46)
> 	at sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:249)
> 	at sun.nio.ch.OptionAdaptor.setTrafficClass(OptionAdaptor.java:158)
> 	at sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:320)
> 	... 4 more
> I have attached a proposed patch and welcome any comments.
> SimonT

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Reopened: (DIRMINA-200) IBM iSeries throws unexpected SocketException

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRMINA-200?page=all ]
     
Trustin Lee reopened DIRMINA-200:
---------------------------------


It seems like my fix didn't work because getTrafficClass() doesn't always throw an exception.  It would be nice if I have a machine which can reproduce this issue.

> IBM iSeries throws unexpected SocketException
> ---------------------------------------------
>
>          Key: DIRMINA-200
>          URL: http://issues.apache.org/jira/browse/DIRMINA-200
>      Project: Directory MINA
>         Type: Bug

>     Versions: 0.9.3
>  Environment: mina-0.9.3  JDK 1.4.2  IBM iSeries OS/400 V5R2
>     Reporter: Simon Temple
>     Assignee: Trustin Lee
>     Priority: Blocker
>      Fix For: 0.9.4
>  Attachments: mina-ex.patch
>
> Proposal of a change to nio SocketSessionImpl.
> I'd like the calls to:
> 	getTrafficClass
> 	setTrafficClass
> 	setSendBufferSize
> 	setReceiveBufferSize
> to not throw RuntimeIOException when a SocketException is caught.
> My reasoning is based on the Socket class javadoc:
> E.g.  setTrafficClass
> "As the underlying network implementation may ignore this value applications should consider it a hint."
> and
> "Setting bits in the precedence field may result in a SocketException indicating that the operation is not permitted."
> The other getter/setter method javadoc also refer to 'hints' and a 'if there is an error obtaining' condition.
> Some operating systems (OS/400 in my case ;-) ), do not allow the trafficClass value to be read or written.  I think this may also be the case as reported here on Linux:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4709474
> By ignoring the SocketException thrown by these methods (perhaps issuing a log4j WARN instead?  Or hooking up with an appropriate monitor?), socket sessions can be established without error on an IBM iSeries.
> Example stack trace:
> 2006-04-03 17:26:26,343 WARN  [org.apache.mina.common.support.DefaultExceptionMonitor](SocketAcceptor-0) Unexpected exception.
> org.apache.mina.common.RuntimeIOException: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:240)
> 	at java.lang.Exception.<init>(Exception.java:77)
> 	at java.lang.RuntimeException.<init>(RuntimeException.java:77)
> 	at org.apache.mina.common.RuntimeIOException.<init>(RuntimeIOException.java:48)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl$SocketSessionConfigImpl.setTrafficClass(SocketSessionImpl.java:342)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl.<init>(SocketSessionImpl.java:71)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.processSessions(SocketAcceptorDelegate.java:379)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.run(SocketAcceptorDelegate.java:326)
> Caused by: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:180)
> 	at java.lang.Exception.<init>(Exception.java:29)
> 	at java.io.IOException.<init>(IOException.java:28)
> 	at java.net.SocketException.<init>(SocketException.java:35)
> 	at sun.nio.ch.Net.setIntOption(Net.java:156)
> 	at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:398)
> 	at sun.nio.ch.SocketOptsImpl.setInt(SocketOptsImpl.java:46)
> 	at sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:249)
> 	at sun.nio.ch.OptionAdaptor.setTrafficClass(OptionAdaptor.java:158)
> 	at sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:320)
> 	... 4 more
> I have attached a proposed patch and welcome any comments.
> SimonT

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DIRMINA-200) IBM iSeries throws unexpected SocketException

Posted by "Simon Temple (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRMINA-200?page=all ]

Simon Temple updated DIRMINA-200:
---------------------------------

    Attachment: mina-ex.patch

This is an example patch I have used to fix the nio socket connection problem on IBM iSeries

> IBM iSeries throws unexpected SocketException
> ---------------------------------------------
>
>          Key: DIRMINA-200
>          URL: http://issues.apache.org/jira/browse/DIRMINA-200
>      Project: Directory MINA
>         Type: Bug

>     Versions: 0.9.3
>  Environment: mina-0.9.3  JDK 1.4.2  IBM iSeries OS/400 V5R2
>     Reporter: Simon Temple
>     Priority: Blocker
>  Attachments: mina-ex.patch
>
> Proposal of a change to nio SocketSessionImpl.
> I'd like the calls to:
> 	getTrafficClass
> 	setTrafficClass
> 	setSendBufferSize
> 	setReceiveBufferSize
> to not throw RuntimeIOException when a SocketException is caught.
> My reasoning is based on the Socket class javadoc:
> E.g.  setTrafficClass
> "As the underlying network implementation may ignore this value applications should consider it a hint."
> and
> "Setting bits in the precedence field may result in a SocketException indicating that the operation is not permitted."
> The other getter/setter method javadoc also refer to 'hints' and a 'if there is an error obtaining' condition.
> Some operating systems (OS/400 in my case ;-) ), do not allow the trafficClass value to be read or written.  I think this may also be the case as reported here on Linux:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4709474
> By ignoring the SocketException thrown by these methods (perhaps issuing a log4j WARN instead?  Or hooking up with an appropriate monitor?), socket sessions can be established without error on an IBM iSeries.
> Example stack trace:
> 2006-04-03 17:26:26,343 WARN  [org.apache.mina.common.support.DefaultExceptionMonitor](SocketAcceptor-0) Unexpected exception.
> org.apache.mina.common.RuntimeIOException: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:240)
> 	at java.lang.Exception.<init>(Exception.java:77)
> 	at java.lang.RuntimeException.<init>(RuntimeException.java:77)
> 	at org.apache.mina.common.RuntimeIOException.<init>(RuntimeIOException.java:48)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl$SocketSessionConfigImpl.setTrafficClass(SocketSessionImpl.java:342)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl.<init>(SocketSessionImpl.java:71)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.processSessions(SocketAcceptorDelegate.java:379)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.run(SocketAcceptorDelegate.java:326)
> Caused by: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:180)
> 	at java.lang.Exception.<init>(Exception.java:29)
> 	at java.io.IOException.<init>(IOException.java:28)
> 	at java.net.SocketException.<init>(SocketException.java:35)
> 	at sun.nio.ch.Net.setIntOption(Net.java:156)
> 	at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:398)
> 	at sun.nio.ch.SocketOptsImpl.setInt(SocketOptsImpl.java:46)
> 	at sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:249)
> 	at sun.nio.ch.OptionAdaptor.setTrafficClass(OptionAdaptor.java:158)
> 	at sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:320)
> 	... 4 more
> I have attached a proposed patch and welcome any comments.
> SimonT

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRMINA-200) IBM iSeries throws unexpected SocketException

Posted by "Simon Temple (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRMINA-200?page=comments#action_12417138 ] 

Simon Temple commented on DIRMINA-200:
--------------------------------------

Sorry I can't deploy and test a trunk build without rebuilding all other DS related JARs (due to refactoring changes since V1RC3)

I tried patching a couple of files in 0.9.3 but classes have moved between:

    org\apache\mina\transport\socket\nio\support
and
    org\apache\mina\transport\socket\nio

the class SocketConnectorDelegate.java also looks like its gone and... 

Bottom line is I'm struggling with the trunk patch.  Can you supply a patch for 0.9.4 or 0.9.3?

Thanks



> IBM iSeries throws unexpected SocketException
> ---------------------------------------------
>
>          Key: DIRMINA-200
>          URL: http://issues.apache.org/jira/browse/DIRMINA-200
>      Project: Directory MINA
>         Type: Bug

>     Versions: 0.9.3
>  Environment: mina-0.9.3  JDK 1.4.2  IBM iSeries OS/400 V5R2
>     Reporter: Simon Temple
>     Assignee: Trustin Lee
>     Priority: Blocker
>      Fix For: 0.9.4
>  Attachments: mina-ex.patch
>
> Proposal of a change to nio SocketSessionImpl.
> I'd like the calls to:
> 	getTrafficClass
> 	setTrafficClass
> 	setSendBufferSize
> 	setReceiveBufferSize
> to not throw RuntimeIOException when a SocketException is caught.
> My reasoning is based on the Socket class javadoc:
> E.g.  setTrafficClass
> "As the underlying network implementation may ignore this value applications should consider it a hint."
> and
> "Setting bits in the precedence field may result in a SocketException indicating that the operation is not permitted."
> The other getter/setter method javadoc also refer to 'hints' and a 'if there is an error obtaining' condition.
> Some operating systems (OS/400 in my case ;-) ), do not allow the trafficClass value to be read or written.  I think this may also be the case as reported here on Linux:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4709474
> By ignoring the SocketException thrown by these methods (perhaps issuing a log4j WARN instead?  Or hooking up with an appropriate monitor?), socket sessions can be established without error on an IBM iSeries.
> Example stack trace:
> 2006-04-03 17:26:26,343 WARN  [org.apache.mina.common.support.DefaultExceptionMonitor](SocketAcceptor-0) Unexpected exception.
> org.apache.mina.common.RuntimeIOException: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:240)
> 	at java.lang.Exception.<init>(Exception.java:77)
> 	at java.lang.RuntimeException.<init>(RuntimeException.java:77)
> 	at org.apache.mina.common.RuntimeIOException.<init>(RuntimeIOException.java:48)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl$SocketSessionConfigImpl.setTrafficClass(SocketSessionImpl.java:342)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl.<init>(SocketSessionImpl.java:71)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.processSessions(SocketAcceptorDelegate.java:379)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.run(SocketAcceptorDelegate.java:326)
> Caused by: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:180)
> 	at java.lang.Exception.<init>(Exception.java:29)
> 	at java.io.IOException.<init>(IOException.java:28)
> 	at java.net.SocketException.<init>(SocketException.java:35)
> 	at sun.nio.ch.Net.setIntOption(Net.java:156)
> 	at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:398)
> 	at sun.nio.ch.SocketOptsImpl.setInt(SocketOptsImpl.java:46)
> 	at sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:249)
> 	at sun.nio.ch.OptionAdaptor.setTrafficClass(OptionAdaptor.java:158)
> 	at sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:320)
> 	... 4 more
> I have attached a proposed patch and welcome any comments.
> SimonT

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRMINA-200) IBM iSeries throws unexpected SocketException

Posted by "Simon Temple (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRMINA-200?page=comments#action_12444343 ] 
            
Simon Temple commented on DIRMINA-200:
--------------------------------------


Sorry I took so long!

I've just test DS 1.0 and MINA 1.0.0 and the bug is fixed.

Many Thanks

SimonT

22 June 2006 02:06
To: simon.temple@saaconsultants.com
cc:
From: "Trustin Lee (JIRA)" <ji...@apache.org>
Subject: [jira] Commented: (DIRMINA-200) IBM iSeries throws unexpected
SocketException


    [
    http://issues.apache.org/jira/browse/DIRMINA-200?page=comments#action_12417223
 ]

Trustin Lee commented on DIRMINA-200:
-------------------------------------

SocketAcceptor/ConnectorDelegate has been replaced with
SocketAcceptor/Connector in 0.9.5.  Unfortunately, you'll have to patch it
manually for now though the next RC of ApacheDS will use MINA 0.9.5 or
above.

The following URL shows all changes made for this issue:

http://issues.apache.org/jira/browse/DIRMINA-200?page=com.atlassian.jira.plugin.ext.subversion:subversion-commits-tabpanel


applications should consider it a hint."
indicating that the operation is not permitted."
there is an error obtaining' condition.
trafficClass value to be read or written.  I think this may also be the
case as reported here on Linux:
a log4j WARN instead?  Or hooking up with an appropriate monitor?), socket
sessions can be established without error on an IBM iSeries.
[org.apache.mina.common.support.DefaultExceptionMonitor](SocketAcceptor-0)
Unexpected exception.
org.apache.mina.common.RuntimeIOException.<init>(RuntimeIOException.java:48)
org.apache.mina.transport.socket.nio.support.SocketSessionImpl$SocketSessionConfigImpl.setTrafficClass(SocketSessionImpl.java:342)
org.apache.mina.transport.socket.nio.support.SocketSessionImpl.<init>(SocketSessionImpl.java:71)
org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.processSessions(SocketAcceptorDelegate.java:379)
org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.run(SocketAcceptorDelegate.java:326)
sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:249)

--

This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
   -
   For more information on JIRA, see:
   http://www.atlassian.com/software/jira



> IBM iSeries throws unexpected SocketException
> ---------------------------------------------
>
>                 Key: DIRMINA-200
>                 URL: http://issues.apache.org/jira/browse/DIRMINA-200
>             Project: Directory MINA
>          Issue Type: Bug
>    Affects Versions: 0.9.3, 0.9.4
>         Environment: mina-0.9.3  JDK 1.4.2  IBM iSeries OS/400 V5R2
>            Reporter: Simon Temple
>         Assigned To: Trustin Lee
>            Priority: Blocker
>             Fix For: 0.9.5
>
>         Attachments: mina-ex.patch
>
>
> Proposal of a change to nio SocketSessionImpl.
> I'd like the calls to:
> 	getTrafficClass
> 	setTrafficClass
> 	setSendBufferSize
> 	setReceiveBufferSize
> to not throw RuntimeIOException when a SocketException is caught.
> My reasoning is based on the Socket class javadoc:
> E.g.  setTrafficClass
> "As the underlying network implementation may ignore this value applications should consider it a hint."
> and
> "Setting bits in the precedence field may result in a SocketException indicating that the operation is not permitted."
> The other getter/setter method javadoc also refer to 'hints' and a 'if there is an error obtaining' condition.
> Some operating systems (OS/400 in my case ;-) ), do not allow the trafficClass value to be read or written.  I think this may also be the case as reported here on Linux:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4709474
> By ignoring the SocketException thrown by these methods (perhaps issuing a log4j WARN instead?  Or hooking up with an appropriate monitor?), socket sessions can be established without error on an IBM iSeries.
> Example stack trace:
> 2006-04-03 17:26:26,343 WARN  [org.apache.mina.common.support.DefaultExceptionMonitor](SocketAcceptor-0) Unexpected exception.
> org.apache.mina.common.RuntimeIOException: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:240)
> 	at java.lang.Exception.<init>(Exception.java:77)
> 	at java.lang.RuntimeException.<init>(RuntimeException.java:77)
> 	at org.apache.mina.common.RuntimeIOException.<init>(RuntimeIOException.java:48)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl$SocketSessionConfigImpl.setTrafficClass(SocketSessionImpl.java:342)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl.<init>(SocketSessionImpl.java:71)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.processSessions(SocketAcceptorDelegate.java:379)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.run(SocketAcceptorDelegate.java:326)
> Caused by: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:180)
> 	at java.lang.Exception.<init>(Exception.java:29)
> 	at java.io.IOException.<init>(IOException.java:28)
> 	at java.net.SocketException.<init>(SocketException.java:35)
> 	at sun.nio.ch.Net.setIntOption(Net.java:156)
> 	at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:398)
> 	at sun.nio.ch.SocketOptsImpl.setInt(SocketOptsImpl.java:46)
> 	at sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:249)
> 	at sun.nio.ch.OptionAdaptor.setTrafficClass(OptionAdaptor.java:158)
> 	at sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:320)
> 	... 4 more
> I have attached a proposed patch and welcome any comments.
> SimonT

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DIRMINA-200) IBM iSeries throws unexpected SocketException

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRMINA-200?page=all ]

Trustin Lee updated DIRMINA-200:
--------------------------------

    Fix Version: 0.9.5
                     (was: 0.9.4)
        Version: 0.9.4

> IBM iSeries throws unexpected SocketException
> ---------------------------------------------
>
>          Key: DIRMINA-200
>          URL: http://issues.apache.org/jira/browse/DIRMINA-200
>      Project: Directory MINA
>         Type: Bug

>     Versions: 0.9.3, 0.9.4
>  Environment: mina-0.9.3  JDK 1.4.2  IBM iSeries OS/400 V5R2
>     Reporter: Simon Temple
>     Assignee: Trustin Lee
>     Priority: Blocker
>      Fix For: 0.9.5
>  Attachments: mina-ex.patch
>
> Proposal of a change to nio SocketSessionImpl.
> I'd like the calls to:
> 	getTrafficClass
> 	setTrafficClass
> 	setSendBufferSize
> 	setReceiveBufferSize
> to not throw RuntimeIOException when a SocketException is caught.
> My reasoning is based on the Socket class javadoc:
> E.g.  setTrafficClass
> "As the underlying network implementation may ignore this value applications should consider it a hint."
> and
> "Setting bits in the precedence field may result in a SocketException indicating that the operation is not permitted."
> The other getter/setter method javadoc also refer to 'hints' and a 'if there is an error obtaining' condition.
> Some operating systems (OS/400 in my case ;-) ), do not allow the trafficClass value to be read or written.  I think this may also be the case as reported here on Linux:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4709474
> By ignoring the SocketException thrown by these methods (perhaps issuing a log4j WARN instead?  Or hooking up with an appropriate monitor?), socket sessions can be established without error on an IBM iSeries.
> Example stack trace:
> 2006-04-03 17:26:26,343 WARN  [org.apache.mina.common.support.DefaultExceptionMonitor](SocketAcceptor-0) Unexpected exception.
> org.apache.mina.common.RuntimeIOException: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:240)
> 	at java.lang.Exception.<init>(Exception.java:77)
> 	at java.lang.RuntimeException.<init>(RuntimeException.java:77)
> 	at org.apache.mina.common.RuntimeIOException.<init>(RuntimeIOException.java:48)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl$SocketSessionConfigImpl.setTrafficClass(SocketSessionImpl.java:342)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl.<init>(SocketSessionImpl.java:71)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.processSessions(SocketAcceptorDelegate.java:379)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.run(SocketAcceptorDelegate.java:326)
> Caused by: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:180)
> 	at java.lang.Exception.<init>(Exception.java:29)
> 	at java.io.IOException.<init>(IOException.java:28)
> 	at java.net.SocketException.<init>(SocketException.java:35)
> 	at sun.nio.ch.Net.setIntOption(Net.java:156)
> 	at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:398)
> 	at sun.nio.ch.SocketOptsImpl.setInt(SocketOptsImpl.java:46)
> 	at sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:249)
> 	at sun.nio.ch.OptionAdaptor.setTrafficClass(OptionAdaptor.java:158)
> 	at sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:320)
> 	... 4 more
> I have attached a proposed patch and welcome any comments.
> SimonT

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DIRMINA-200) IBM iSeries throws unexpected SocketException

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRMINA-200?page=all ]

Trustin Lee resolved DIRMINA-200.
---------------------------------

    Resolution: Fixed

There has been no feed back since my last fix.  I will mark this issue as resolved for now and reopen it when someone reports the problem again.

> IBM iSeries throws unexpected SocketException
> ---------------------------------------------
>
>                 Key: DIRMINA-200
>                 URL: http://issues.apache.org/jira/browse/DIRMINA-200
>             Project: Directory MINA
>          Issue Type: Bug
>    Affects Versions: 0.9.3, 0.9.4
>         Environment: mina-0.9.3  JDK 1.4.2  IBM iSeries OS/400 V5R2
>            Reporter: Simon Temple
>         Assigned To: Trustin Lee
>            Priority: Blocker
>             Fix For: 0.9.5
>
>         Attachments: mina-ex.patch
>
>
> Proposal of a change to nio SocketSessionImpl.
> I'd like the calls to:
> 	getTrafficClass
> 	setTrafficClass
> 	setSendBufferSize
> 	setReceiveBufferSize
> to not throw RuntimeIOException when a SocketException is caught.
> My reasoning is based on the Socket class javadoc:
> E.g.  setTrafficClass
> "As the underlying network implementation may ignore this value applications should consider it a hint."
> and
> "Setting bits in the precedence field may result in a SocketException indicating that the operation is not permitted."
> The other getter/setter method javadoc also refer to 'hints' and a 'if there is an error obtaining' condition.
> Some operating systems (OS/400 in my case ;-) ), do not allow the trafficClass value to be read or written.  I think this may also be the case as reported here on Linux:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4709474
> By ignoring the SocketException thrown by these methods (perhaps issuing a log4j WARN instead?  Or hooking up with an appropriate monitor?), socket sessions can be established without error on an IBM iSeries.
> Example stack trace:
> 2006-04-03 17:26:26,343 WARN  [org.apache.mina.common.support.DefaultExceptionMonitor](SocketAcceptor-0) Unexpected exception.
> org.apache.mina.common.RuntimeIOException: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:240)
> 	at java.lang.Exception.<init>(Exception.java:77)
> 	at java.lang.RuntimeException.<init>(RuntimeException.java:77)
> 	at org.apache.mina.common.RuntimeIOException.<init>(RuntimeIOException.java:48)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl$SocketSessionConfigImpl.setTrafficClass(SocketSessionImpl.java:342)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl.<init>(SocketSessionImpl.java:71)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.processSessions(SocketAcceptorDelegate.java:379)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.run(SocketAcceptorDelegate.java:326)
> Caused by: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:180)
> 	at java.lang.Exception.<init>(Exception.java:29)
> 	at java.io.IOException.<init>(IOException.java:28)
> 	at java.net.SocketException.<init>(SocketException.java:35)
> 	at sun.nio.ch.Net.setIntOption(Net.java:156)
> 	at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:398)
> 	at sun.nio.ch.SocketOptsImpl.setInt(SocketOptsImpl.java:46)
> 	at sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:249)
> 	at sun.nio.ch.OptionAdaptor.setTrafficClass(OptionAdaptor.java:158)
> 	at sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:320)
> 	... 4 more
> I have attached a proposed patch and welcome any comments.
> SimonT

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DIRMINA-200) IBM iSeries throws unexpected SocketException

Posted by "Simon Temple (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRMINA-200?page=comments#action_12416871 ] 

Simon Temple commented on DIRMINA-200:
--------------------------------------

We are running 0.9.4 (Release)

It looks like:

            SocketSessionConfigImpl.isGetTrafficClassAvailable() is returning true...but...

2006-06-20 09:44:59,315 WARN  [org.apache.mina.common.support.DefaultExceptionMonitor](SocketAcceptor-0) Unexpected exception.
org.apache.mina.common.RuntimeIOException: java.net.SocketException
	at java.lang.Throwable.<init>(Throwable.java:240)
	at java.lang.Exception.<init>(Exception.java:77)
	at java.lang.RuntimeException.<init>(RuntimeException.java:77)Sock
	at org.apache.mina.common.RuntimeIOException.<init>(RuntimeIOException.java:48)
	at org.apache.mina.transport.socket.nio.SocketSessionImpl$SessionConfigImpl.getTrafficClass(SocketSessionImpl.java:348)
	at org.apache.mina.transport.socket.nio.SocketSessionImpl.<init>(SocketSessionImpl.java:96)
	at org.apache.mina.transport.socket.nio.SocketAcceptor$Worker.processSessions(SocketAcceptor.java:435)
	at org.apache.mina.transport.socket.nio.SocketAcceptor$Worker.run(SocketAcceptor.java:362)
Caused by: java.net.SocketException
	at java.lang.Throwable.<init>(Throwable.java:180)
	at java.lang.Exception.<init>(Exception.java:29)
	at java.io.IOException.<init>(IOException.java:28)
	at java.net.SocketException.<init>(SocketException.java:35)
	at sun.nio.ch.Net.getIntOption(Net.java:145)
	at sun.nio.ch.SocketChannelImpl$1.getInt(SocketChannelImpl.java:393)
	at sun.nio.ch.SocketOptsImpl.getInt(SocketOptsImpl.java:42)
	at sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:245)
	at sun.nio.ch.OptionAdaptor.getTrafficClass(OptionAdaptor.java:166)
	at sun.nio.ch.SocketAdaptor.getTrafficClass(etAdaptor.java:325)
	at org.apache.mina.transport.socket.nio.SocketSessionImpl$SessionConfigImpl.getTrafficClass(SocketSessionImpl.java:344)
	... 3 more

> IBM iSeries throws unexpected SocketException
> ---------------------------------------------
>
>          Key: DIRMINA-200
>          URL: http://issues.apache.org/jira/browse/DIRMINA-200
>      Project: Directory MINA
>         Type: Bug

>     Versions: 0.9.3
>  Environment: mina-0.9.3  JDK 1.4.2  IBM iSeries OS/400 V5R2
>     Reporter: Simon Temple
>     Assignee: Trustin Lee
>     Priority: Blocker
>      Fix For: 0.9.4
>  Attachments: mina-ex.patch
>
> Proposal of a change to nio SocketSessionImpl.
> I'd like the calls to:
> 	getTrafficClass
> 	setTrafficClass
> 	setSendBufferSize
> 	setReceiveBufferSize
> to not throw RuntimeIOException when a SocketException is caught.
> My reasoning is based on the Socket class javadoc:
> E.g.  setTrafficClass
> "As the underlying network implementation may ignore this value applications should consider it a hint."
> and
> "Setting bits in the precedence field may result in a SocketException indicating that the operation is not permitted."
> The other getter/setter method javadoc also refer to 'hints' and a 'if there is an error obtaining' condition.
> Some operating systems (OS/400 in my case ;-) ), do not allow the trafficClass value to be read or written.  I think this may also be the case as reported here on Linux:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4709474
> By ignoring the SocketException thrown by these methods (perhaps issuing a log4j WARN instead?  Or hooking up with an appropriate monitor?), socket sessions can be established without error on an IBM iSeries.
> Example stack trace:
> 2006-04-03 17:26:26,343 WARN  [org.apache.mina.common.support.DefaultExceptionMonitor](SocketAcceptor-0) Unexpected exception.
> org.apache.mina.common.RuntimeIOException: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:240)
> 	at java.lang.Exception.<init>(Exception.java:77)
> 	at java.lang.RuntimeException.<init>(RuntimeException.java:77)
> 	at org.apache.mina.common.RuntimeIOException.<init>(RuntimeIOException.java:48)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl$SocketSessionConfigImpl.setTrafficClass(SocketSessionImpl.java:342)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl.<init>(SocketSessionImpl.java:71)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.processSessions(SocketAcceptorDelegate.java:379)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.run(SocketAcceptorDelegate.java:326)
> Caused by: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:180)
> 	at java.lang.Exception.<init>(Exception.java:29)
> 	at java.io.IOException.<init>(IOException.java:28)
> 	at java.net.SocketException.<init>(SocketException.java:35)
> 	at sun.nio.ch.Net.setIntOption(Net.java:156)
> 	at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:398)
> 	at sun.nio.ch.SocketOptsImpl.setInt(SocketOptsImpl.java:46)
> 	at sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:249)
> 	at sun.nio.ch.OptionAdaptor.setTrafficClass(OptionAdaptor.java:158)
> 	at sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:320)
> 	... 4 more
> I have attached a proposed patch and welcome any comments.
> SimonT

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRMINA-200) IBM iSeries throws unexpected SocketException

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRMINA-200?page=comments#action_12374313 ] 

Trustin Lee commented on DIRMINA-200:
-------------------------------------

I think we could just return false for setter methods instead of logging.

Is it fine for us to patch these four methods only?

> IBM iSeries throws unexpected SocketException
> ---------------------------------------------
>
>          Key: DIRMINA-200
>          URL: http://issues.apache.org/jira/browse/DIRMINA-200
>      Project: Directory MINA
>         Type: Bug

>     Versions: 0.9.3
>  Environment: mina-0.9.3  JDK 1.4.2  IBM iSeries OS/400 V5R2
>     Reporter: Simon Temple
>     Priority: Blocker
>  Attachments: mina-ex.patch
>
> Proposal of a change to nio SocketSessionImpl.
> I'd like the calls to:
> 	getTrafficClass
> 	setTrafficClass
> 	setSendBufferSize
> 	setReceiveBufferSize
> to not throw RuntimeIOException when a SocketException is caught.
> My reasoning is based on the Socket class javadoc:
> E.g.  setTrafficClass
> "As the underlying network implementation may ignore this value applications should consider it a hint."
> and
> "Setting bits in the precedence field may result in a SocketException indicating that the operation is not permitted."
> The other getter/setter method javadoc also refer to 'hints' and a 'if there is an error obtaining' condition.
> Some operating systems (OS/400 in my case ;-) ), do not allow the trafficClass value to be read or written.  I think this may also be the case as reported here on Linux:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4709474
> By ignoring the SocketException thrown by these methods (perhaps issuing a log4j WARN instead?  Or hooking up with an appropriate monitor?), socket sessions can be established without error on an IBM iSeries.
> Example stack trace:
> 2006-04-03 17:26:26,343 WARN  [org.apache.mina.common.support.DefaultExceptionMonitor](SocketAcceptor-0) Unexpected exception.
> org.apache.mina.common.RuntimeIOException: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:240)
> 	at java.lang.Exception.<init>(Exception.java:77)
> 	at java.lang.RuntimeException.<init>(RuntimeException.java:77)
> 	at org.apache.mina.common.RuntimeIOException.<init>(RuntimeIOException.java:48)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl$SocketSessionConfigImpl.setTrafficClass(SocketSessionImpl.java:342)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl.<init>(SocketSessionImpl.java:71)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.processSessions(SocketAcceptorDelegate.java:379)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.run(SocketAcceptorDelegate.java:326)
> Caused by: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:180)
> 	at java.lang.Exception.<init>(Exception.java:29)
> 	at java.io.IOException.<init>(IOException.java:28)
> 	at java.net.SocketException.<init>(SocketException.java:35)
> 	at sun.nio.ch.Net.setIntOption(Net.java:156)
> 	at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:398)
> 	at sun.nio.ch.SocketOptsImpl.setInt(SocketOptsImpl.java:46)
> 	at sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:249)
> 	at sun.nio.ch.OptionAdaptor.setTrafficClass(OptionAdaptor.java:158)
> 	at sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:320)
> 	... 4 more
> I have attached a proposed patch and welcome any comments.
> SimonT

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRMINA-200) IBM iSeries throws unexpected SocketException

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRMINA-200?page=comments#action_12374852 ] 

Trustin Lee commented on DIRMINA-200:
-------------------------------------

I checked in the fix to the trunk and deployed 0.9.4-SNAPSHOT.  Please let me know if it fixes this issue.

> IBM iSeries throws unexpected SocketException
> ---------------------------------------------
>
>          Key: DIRMINA-200
>          URL: http://issues.apache.org/jira/browse/DIRMINA-200
>      Project: Directory MINA
>         Type: Bug

>     Versions: 0.9.3
>  Environment: mina-0.9.3  JDK 1.4.2  IBM iSeries OS/400 V5R2
>     Reporter: Simon Temple
>     Priority: Blocker
>  Attachments: mina-ex.patch
>
> Proposal of a change to nio SocketSessionImpl.
> I'd like the calls to:
> 	getTrafficClass
> 	setTrafficClass
> 	setSendBufferSize
> 	setReceiveBufferSize
> to not throw RuntimeIOException when a SocketException is caught.
> My reasoning is based on the Socket class javadoc:
> E.g.  setTrafficClass
> "As the underlying network implementation may ignore this value applications should consider it a hint."
> and
> "Setting bits in the precedence field may result in a SocketException indicating that the operation is not permitted."
> The other getter/setter method javadoc also refer to 'hints' and a 'if there is an error obtaining' condition.
> Some operating systems (OS/400 in my case ;-) ), do not allow the trafficClass value to be read or written.  I think this may also be the case as reported here on Linux:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4709474
> By ignoring the SocketException thrown by these methods (perhaps issuing a log4j WARN instead?  Or hooking up with an appropriate monitor?), socket sessions can be established without error on an IBM iSeries.
> Example stack trace:
> 2006-04-03 17:26:26,343 WARN  [org.apache.mina.common.support.DefaultExceptionMonitor](SocketAcceptor-0) Unexpected exception.
> org.apache.mina.common.RuntimeIOException: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:240)
> 	at java.lang.Exception.<init>(Exception.java:77)
> 	at java.lang.RuntimeException.<init>(RuntimeException.java:77)
> 	at org.apache.mina.common.RuntimeIOException.<init>(RuntimeIOException.java:48)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl$SocketSessionConfigImpl.setTrafficClass(SocketSessionImpl.java:342)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl.<init>(SocketSessionImpl.java:71)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.processSessions(SocketAcceptorDelegate.java:379)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.run(SocketAcceptorDelegate.java:326)
> Caused by: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:180)
> 	at java.lang.Exception.<init>(Exception.java:29)
> 	at java.io.IOException.<init>(IOException.java:28)
> 	at java.net.SocketException.<init>(SocketException.java:35)
> 	at sun.nio.ch.Net.setIntOption(Net.java:156)
> 	at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:398)
> 	at sun.nio.ch.SocketOptsImpl.setInt(SocketOptsImpl.java:46)
> 	at sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:249)
> 	at sun.nio.ch.OptionAdaptor.setTrafficClass(OptionAdaptor.java:158)
> 	at sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:320)
> 	... 4 more
> I have attached a proposed patch and welcome any comments.
> SimonT

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DIRMINA-200) IBM iSeries throws unexpected SocketException

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRMINA-200?page=all ]
     
Trustin Lee resolved DIRMINA-200:
---------------------------------

    Fix Version: 0.9.4
     Resolution: Fixed
      Assign To: Trustin Lee

> IBM iSeries throws unexpected SocketException
> ---------------------------------------------
>
>          Key: DIRMINA-200
>          URL: http://issues.apache.org/jira/browse/DIRMINA-200
>      Project: Directory MINA
>         Type: Bug

>     Versions: 0.9.3
>  Environment: mina-0.9.3  JDK 1.4.2  IBM iSeries OS/400 V5R2
>     Reporter: Simon Temple
>     Assignee: Trustin Lee
>     Priority: Blocker
>      Fix For: 0.9.4
>  Attachments: mina-ex.patch
>
> Proposal of a change to nio SocketSessionImpl.
> I'd like the calls to:
> 	getTrafficClass
> 	setTrafficClass
> 	setSendBufferSize
> 	setReceiveBufferSize
> to not throw RuntimeIOException when a SocketException is caught.
> My reasoning is based on the Socket class javadoc:
> E.g.  setTrafficClass
> "As the underlying network implementation may ignore this value applications should consider it a hint."
> and
> "Setting bits in the precedence field may result in a SocketException indicating that the operation is not permitted."
> The other getter/setter method javadoc also refer to 'hints' and a 'if there is an error obtaining' condition.
> Some operating systems (OS/400 in my case ;-) ), do not allow the trafficClass value to be read or written.  I think this may also be the case as reported here on Linux:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4709474
> By ignoring the SocketException thrown by these methods (perhaps issuing a log4j WARN instead?  Or hooking up with an appropriate monitor?), socket sessions can be established without error on an IBM iSeries.
> Example stack trace:
> 2006-04-03 17:26:26,343 WARN  [org.apache.mina.common.support.DefaultExceptionMonitor](SocketAcceptor-0) Unexpected exception.
> org.apache.mina.common.RuntimeIOException: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:240)
> 	at java.lang.Exception.<init>(Exception.java:77)
> 	at java.lang.RuntimeException.<init>(RuntimeException.java:77)
> 	at org.apache.mina.common.RuntimeIOException.<init>(RuntimeIOException.java:48)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl$SocketSessionConfigImpl.setTrafficClass(SocketSessionImpl.java:342)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl.<init>(SocketSessionImpl.java:71)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.processSessions(SocketAcceptorDelegate.java:379)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.run(SocketAcceptorDelegate.java:326)
> Caused by: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:180)
> 	at java.lang.Exception.<init>(Exception.java:29)
> 	at java.io.IOException.<init>(IOException.java:28)
> 	at java.net.SocketException.<init>(SocketException.java:35)
> 	at sun.nio.ch.Net.setIntOption(Net.java:156)
> 	at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:398)
> 	at sun.nio.ch.SocketOptsImpl.setInt(SocketOptsImpl.java:46)
> 	at sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:249)
> 	at sun.nio.ch.OptionAdaptor.setTrafficClass(OptionAdaptor.java:158)
> 	at sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:320)
> 	... 4 more
> I have attached a proposed patch and welcome any comments.
> SimonT

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRMINA-200) IBM iSeries throws unexpected SocketException

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRMINA-200?page=comments#action_12417224 ] 

Trustin Lee commented on DIRMINA-200:
-------------------------------------

And other missing files in socket.nio.support package should exist in socket.nio package.  Please lt me any other missing files.

> IBM iSeries throws unexpected SocketException
> ---------------------------------------------
>
>          Key: DIRMINA-200
>          URL: http://issues.apache.org/jira/browse/DIRMINA-200
>      Project: Directory MINA
>         Type: Bug

>     Versions: 0.9.3, 0.9.4
>  Environment: mina-0.9.3  JDK 1.4.2  IBM iSeries OS/400 V5R2
>     Reporter: Simon Temple
>     Assignee: Trustin Lee
>     Priority: Blocker
>      Fix For: 0.9.5
>  Attachments: mina-ex.patch
>
> Proposal of a change to nio SocketSessionImpl.
> I'd like the calls to:
> 	getTrafficClass
> 	setTrafficClass
> 	setSendBufferSize
> 	setReceiveBufferSize
> to not throw RuntimeIOException when a SocketException is caught.
> My reasoning is based on the Socket class javadoc:
> E.g.  setTrafficClass
> "As the underlying network implementation may ignore this value applications should consider it a hint."
> and
> "Setting bits in the precedence field may result in a SocketException indicating that the operation is not permitted."
> The other getter/setter method javadoc also refer to 'hints' and a 'if there is an error obtaining' condition.
> Some operating systems (OS/400 in my case ;-) ), do not allow the trafficClass value to be read or written.  I think this may also be the case as reported here on Linux:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4709474
> By ignoring the SocketException thrown by these methods (perhaps issuing a log4j WARN instead?  Or hooking up with an appropriate monitor?), socket sessions can be established without error on an IBM iSeries.
> Example stack trace:
> 2006-04-03 17:26:26,343 WARN  [org.apache.mina.common.support.DefaultExceptionMonitor](SocketAcceptor-0) Unexpected exception.
> org.apache.mina.common.RuntimeIOException: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:240)
> 	at java.lang.Exception.<init>(Exception.java:77)
> 	at java.lang.RuntimeException.<init>(RuntimeException.java:77)
> 	at org.apache.mina.common.RuntimeIOException.<init>(RuntimeIOException.java:48)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl$SocketSessionConfigImpl.setTrafficClass(SocketSessionImpl.java:342)
> 	at org.apache.mina.transport.socket.nio.support.SocketSessionImpl.<init>(SocketSessionImpl.java:71)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.processSessions(SocketAcceptorDelegate.java:379)
> 	at org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate$Worker.run(SocketAcceptorDelegate.java:326)
> Caused by: java.net.SocketException
> 	at java.lang.Throwable.<init>(Throwable.java:180)
> 	at java.lang.Exception.<init>(Exception.java:29)
> 	at java.io.IOException.<init>(IOException.java:28)
> 	at java.net.SocketException.<init>(SocketException.java:35)
> 	at sun.nio.ch.Net.setIntOption(Net.java:156)
> 	at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:398)
> 	at sun.nio.ch.SocketOptsImpl.setInt(SocketOptsImpl.java:46)
> 	at sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:249)
> 	at sun.nio.ch.OptionAdaptor.setTrafficClass(OptionAdaptor.java:158)
> 	at sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:320)
> 	... 4 more
> I have attached a proposed patch and welcome any comments.
> SimonT

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira