0 Replies Latest reply on Jan 19, 2005 9:21 PM by jmer

    SocketException encountered when upgrade jboss from 3.2.3 to

    jmer Newbie

      Hi list;
      We encountered "java.net.SocketException : Sockect close " when we upgraded jboss from 3.2.3 to 3.2.5 on one of our production server. The application compose of a servlet (recieve request and jms client) and a mdb. Message are send a text message. Although request got process by mdb, yet this exception keep on occuring.Has anyone from the list have any idea why this is happening? Below are the log

      2005-01-20 09:32:46,242 DEBUG [org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory] Extracting SpyConnectionFactory from reference
      2005-01-20 09:32:46,260 DEBUG [org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory] The GenericConnectionFactory is: GenericConnectionFactory[server=org.jboss.mq.il.uil2.UILServerIL@13c952f connectionProperties={UIL_ADDRESS_KEY=172.16.17.28, UIL_CHUNKSIZE_KEY=1000000, UIL_TCPNODELAY_KEY=yes, ClientILService=org.jboss.mq.il.uil2.UILClientILService, UIL_PORT_KEY=8093, UIL_BUFFERSIZE_KEY=2048, PingPeriod=60000}]
      2005-01-20 09:32:46,260 DEBUG [org.jboss.mq.referenceable.SpyDestinationObjectFactory] SpyDestinationObjectFactory->getObjectInstance()
      2005-01-20 09:32:46,273 DEBUG [org.jboss.mq.il.uil2.SocketManager] Begin ReadTask.run
      2005-01-20 09:32:46,273 DEBUG [org.jboss.mq.il.uil2.SocketManager] Begin ReadTask.run
      2005-01-20 09:32:46,274 DEBUG [org.jboss.mq.il.uil2.SocketManager] Begin WriteTask.run
      2005-01-20 09:32:46,275 DEBUG [org.jboss.mq.il.uil2.SocketManager] Begin WriteTask.run
      2005-01-20 09:32:46,275 DEBUG [org.jboss.mq.il.uil2.SocketManager] Created ObjectOutputStream
      2005-01-20 09:32:46,275 DEBUG [org.jboss.mq.il.uil2.SocketManager] Created ObjectOutputStream
      2005-01-20 09:32:46,276 DEBUG [org.jboss.mq.il.uil2.SocketManager] Created ObjectInputStream
      2005-01-20 09:32:46,279 DEBUG [org.jboss.mq.il.uil2.SocketManager] Created ObjectInputStream
      2005-01-20 09:32:46,282 DEBUG [org.jboss.mq.il.uil2.UILClientILService] Starting
      2005-01-20 09:32:46,286 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Setting up the UILClientIL Connection
      2005-01-20 09:32:46,287 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] The UILClientIL Connection is set up
      2005-01-20 09:32:46,408 DEBUG [org.jboss.mq.il.uil2.UILClientILService] Stopping
      2005-01-20 09:32:46,408 DEBUG [org.jboss.mq.il.uil2.SocketManager] End WriteTask.run
      2005-01-20 09:32:46,408 DEBUG [org.jboss.mq.il.uil2.SocketManager] End WriteTask.run
      2005-01-20 09:32:46,412 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:183)
      at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
      at org.jboss.util.stream.NotifyingBufferedInputStream.read(NotifyingBufferedInputStream.java:67)
      at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2133)
      at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2313)
      at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2380)
      at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2452)
      at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2601)
      at java.io.ObjectInputStream.readByte(ObjectInputStream.java:845)
      at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:279)
      at java.lang.Thread.run(Thread.java:534)
      2005-01-20 09:32:46,412 DEBUG [org.jboss.mq.il.uil2.SocketManager] End ReadTask.run
      2005-01-20 09:32:46,413 DEBUG [org.jboss.mq.il.uil2.SocketManager] End ReadTask.run

      snipplet of the jms client

      //jndi lookups on ConnectionFactory, QueueA
       Context jndiContext = new InitialContext();
       QueueConnectionFactory qConnFactory = (QueueConnectionFactory)jndiContext.lookup("ConnectionFactory");
       Queue qMailSender = (Queue)jndiContext.lookup("queue/bbhd-MailSenderQueue");
      
       //Create QueueConnection and QueueSession
       QueueConnection qConnection = qConnFactory.createQueueConnection();
       QueueSession qSession = qConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
      
       //Create MapMessage, attach Transaction ID, MessageFormat and Other Data
       TextMessage txtMsg = qSession.createTextMessage();
       txtMsg.setStringProperty("MessageFormat","BBHD Version 2.1.0.6");
       //added oct 5,2004
       String mymsgId = String.valueOf(data.getMsgID()).equals("0")?String.valueOf(msgId):String.valueOf(msgId);
       txtMsg.setStringProperty("Pin", String.valueOf(data.getPin()));
       txtMsg.setStringProperty("User", String.valueOf(data.getName()));
       txtMsg.setStringProperty("MsgId", mymsgId);
      
      
       txtMsg.setText(buff.toString());
      
       //Create QueueSender and send the MapMessage
       QueueSender qSender = qSession.createSender(qMailSender);
       qSender.send(txtMsg, DeliveryMode.PERSISTENT, Message.DEFAULT_PRIORITY, 180000);
       qSender.close();
       qSession.close();
       qConnection.close();
      
      
       ByteArrayOutputStream test= new ByteArrayOutputStream();
       DataOutputStream dis = new DataOutputStream(test);
       dis.writeUTF(data.getHeader());outp.write(test.toByteArray());
      
       outp.flush();
       outp.close();