- 
        1. Re: NPE when closing connectionadrian.brock Jul 24, 2007 12:11 PM (in response to miket1)Here's the source. 
 http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/tags/JBoss_4_0_5_GA/messaging/src/main/org/jboss/mq/server/JMSDestinationManager.java?annotate=57516
 Since you don't post the stacktrace there's no way for me to validate your assertion.
 I don't see a possibility for an NPE in that code.
- 
        2. Re: NPE when closing connectionmiket1 Jul 25, 2007 3:53 AM (in response to miket1)2007-07-25 09:47:13,656 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Exiting on IOE 
 java.net.SocketException: Socket closed
 at java.net.SocketInputStream.read(SocketInputStream.java:162)
 at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
 at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
 at org.jboss.util.stream.NotifyingBufferedInputStream.read(NotifyingBufferedInputStream.java:79)
 at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2196)
 at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2376)
 at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2443)
 at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2515)
 at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2664)
 at java.io.ObjectInputStream.readByte(ObjectInputStream.java:875)
 at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:316)
 at java.lang.Thread.run(Thread.java:595)
 2007-07-25 09:47:13,660 DEBUG [org.jboss.mq.il.uil2.SocketManager] End ReadTask.run
 2007-07-25 09:47:13,676 DEBUG [org.jboss.mq.il.uil2.SocketManager] Failed to handle: org.jboss.mq.il.uil2.msgs.CloseMsg4537415[msgType: m_connectionClosing, msgID: 9, error: null]
 java.io.IOException: Client is not connected
 at org.jboss.mq.il.uil2.SocketManager.internalSendMessage(SocketManager.java:264)
 at org.jboss.mq.il.uil2.SocketManager.sendReply(SocketManager.java:238)
 at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:131)
 at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:395)
 at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:398)
 at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
 at java.lang.Thread.run(Thread.java:595)
 2007-07-25 09:47:13,676 DEBUG [org.jboss.mq.il.uil2.SocketManager] Failed to send error reply
 java.io.IOException: Client is not connected
 at org.jboss.mq.il.uil2.SocketManager.internalSendMessage(SocketManager.java:264)
 at org.jboss.mq.il.uil2.SocketManager.access$800(SocketManager.java:53)
 at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:408)
 at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:398)
 at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
 at java.lang.Thread.run(Thread.java:595)
- 
        
- 
        4. Re: NPE when closing connectionadrian.brock Jul 25, 2007 3:15 PM (in response to miket1)And there's no NPE in that stacktrace or even a reference to the DestinationManager 
 for that matter.
- 
        5. Re: NPE when closing connectionmiket1 Jul 26, 2007 3:52 AM (in response to miket1)Thank you Adrian, 
 I didn't find FAQ about this error.
 I only have visited this url: http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossMQIGetJava.net.SocketExceptionConnectionResetWhy
 But the exception is not the same:
 2006-12-12 17:41:21,752 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Exiting on IOE
 java.net.SocketException: Connection reset
 instead of (my exception):
 2007-07-25 09:47:13,656 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Exiting on IOE
 java.net.SocketException: Socket closed.
 And in this FAQ was written:
 Reason: The JMS client is not closing the connection. The connection is reset by the OS when the VM exits.
 My JMS client is closing the connection in a finally block.
 Thanks in advance.
 Mika
- 
        6. Re: NPE when closing connectionadrian.brock Jul 26, 2007 11:49 AM (in response to miket1)There's currently two concurrent posts about this "error". 
 For the 10,000th time. DEBUG != ERROR
 connection.close() -> socket.close() -> DEBUG message saying the socket was closed
 and the client is no longer connected.
 Mainly because you are not using the pooled jms resource adapter like you should be.
- 
        7. Re: NPE when closing connectionadrian.brock Jul 26, 2007 11:51 AM (in response to miket1)And also for the 10,000th time 
 the response "FAQ" doesn't just mean its in the FAQ on the WIKI.
 It usually means the question has appeared hundreds of times before in this forum.
 I don't create FAQs because people can't read or understand the word "DEBUG".
- 
        8. Re: NPE when closing connectionamjad277 Aug 3, 2007 3:49 AM (in response to miket1)I have the same problem. does any one find the solution 
 
    