You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Rafael H. Schloming (JIRA)" <qp...@incubator.apache.org> on 2008/12/23 17:21:44 UTC
[jira] Commented: (QPID-1547) Client always displays exception on
Windows
[ https://issues.apache.org/jira/browse/QPID-1547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12658868#action_12658868 ]
Rafael H. Schloming commented on QPID-1547:
-------------------------------------------
I've submitted a slightly modified version of the suggested fix. It's been tested on linux, but not on windows yet.
> Client always displays exception on Windows
> -------------------------------------------
>
> Key: QPID-1547
> URL: https://issues.apache.org/jira/browse/QPID-1547
> Project: Qpid
> Issue Type: Bug
> Components: Java Client
> Affects Versions: M4
> Reporter: Arnaud Simon
> Assignee: Arnaud Simon
>
> A java client running on Windows always displays the following exception when closing a JMS connection:
> org.apache.qpid.AMQException: socket closed
> at org.apache.qpid.client.AMQConnectionDelegate_0_10.closeConnection(AMQConnectionDelegate_0_10.java:188)
> at org.apache.qpid.client.AMQConnection.doClose(AMQConnection.java:926)
> at org.apache.qpid.client.AMQConnection.doClose(AMQConnection.java:893)
> at org.apache.qpid.client.AMQConnection.close(AMQConnection.java:880)
> at org.apache.qpid.client.AMQConnection.close(AMQConnection.java:873)
> at org.apache.qpid.client.AMQConnection.close(AMQConnection.java:868)
> at org.apache.qpid.example.jmsexample.direct.Producer.runTest(Producer.java:126)
> at org.apache.qpid.example.jmsexample.direct.Producer.main(Producer.java:63)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
> Caused by: org.apache.qpid.transport.ConnectionException: socket closed
> at org.apache.qpid.transport.Connection.close(Connection.java:487)
> at org.apache.qpid.transport.Connection.close(Connection.java:458)
> at org.apache.qpid.client.AMQConnectionDelegate_0_10.closeConnection(AMQConnectionDelegate_0_10.java:184)
> ... 12 more
> Caused by: org.apache.qpid.transport.ConnectionException: socket closed
> at org.apache.qpid.transport.Connection.exception(Connection.java:398)
> at org.apache.qpid.transport.network.Assembler.exception(Assembler.java:108)
> at org.apache.qpid.transport.network.InputHandler.exception(InputHandler.java:196)
> at org.apache.qpid.transport.network.io.IoReceiver.run(IoReceiver.java:136)
> Caused by: java.net.SocketException: socket closed
> at java.net.SocketInputStream.socketRead0(Native Method)
> at java.net.SocketInputStream.read(SocketInputStream.java:129)
> at org.apache.qpid.transport.network.io.IoReceiver.run(IoReceiver.java:111)
> Producer: Caught an Exception: javax.jms.JMSException: Error closing connection: org.apache.qpid.AMQException: socket closed
> javax.jms.JMSException: Error closing connection: org.apache.qpid.AMQException: socket closed
> at org.apache.qpid.client.AMQConnection.doClose(AMQConnection.java:942)
> at org.apache.qpid.client.AMQConnection.doClose(AMQConnection.java:893)
> at org.apache.qpid.client.AMQConnection.close(AMQConnection.java:880)
> at org.apache.qpid.client.AMQConnection.close(AMQConnection.java:873)
> at org.apache.qpid.client.AMQConnection.close(AMQConnection.java:868)
> at org.apache.qpid.example.jmsexample.direct.Producer.runTest(Producer.java:126)
> at org.apache.qpid.example.jmsexample.direct.Producer.main(Producer.java:63)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
>
> This exception is displayed on windows because the socket is closed (see qpid-1251 for more details). I would suggest the following fix:
> add the following catch clause to method run() of class org.apache.qpid.transport.network.io.IoReceiver
> catch (SocketException se)
> {
> if( ! (se.getMessage().equalsIgnoreCase("socket closed") && closed.get()))
> {
> receiver.exception(se);
> }
> }
> This would swallow socket closed exception when the connection has previously been closed
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.