5 Replies Latest reply on Mar 19, 2007 8:59 AM by fsanti

    Exiting on IOE java.net.SocketException: socket closed

    geniusfox

      Hi :
      I use jboss4.0.1sp1 as my JMS server. My sampel code as:

      public static void main(String[] arg) {
       try {
       Context context = ContextHelper.getContext();
       QueueConnectionFactory factory = (QueueConnectionFactory)context.lookup("java:/ConnectionFactory");
       QueueConnection connection = factory.createQueueConnection();
       connection.start();
       connection.stop();
       connection.close();
       connection=null;
       }
       catch(Exception e) {
       e.printStackTrace();
       }
       }

      When i run this program, In my jboss's server.log will catch a exception:
      2005-07-07 12:19:14,414 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Exiting on IOE
      java.net.SocketException: socket closed
      at java.net.SocketInputStream.socketRead0(Native Method)
      at java.net.SocketInputStream.read(SocketInputStream.java:129)
      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:290)
      at java.lang.Thread.run(Thread.java:534)

      Pls! what's the problem in my code? I use the default jboss conf.