6 Replies Latest reply on Oct 3, 2002 1:31 PM by simon smith

    Connection failure

    MN Newbie

      I am having problems receiving JMS messages using JBoss 3.0.2. The remote client seems to run fine and does not throw an Exception. Just on the server side I get a connection failure and the message is never consumed by the MDB. It looks like a configuration problem, so I hope somebody can give me a hint on how to solve this problem.

      The following Exception is thrown by JBoss when I try to send a message using "ConnectionFactory":

      2002-09-23 15:15:36,629 DEBUG [org.jboss.mq.il.oil.OILClientIL] ConnectionReceiverOILClient is connecting to: xxx.xxx.xxx.xxx:2344
      2002-09-23 15:15:36,861 WARN [org.jboss.mq.il.oil.OILServerILService] Connection failure (1).
      java.net.SocketException: Connection reset
      at java.net.SocketInputStream.read(SocketInputStream.java:168)
      at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
      at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
      at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2133)
      at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2316)
      at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2383)
      at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2455)
      at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2604)
      at java.io.ObjectInputStream.readByte(ObjectInputStream.java:845)
      at org.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.java:205)
      at java.lang.Thread.run(Thread.java:536)

      and later I try to use "UILConnectionFactory":

      2002-09-23 15:21:19,198 DEBUG [org.jboss.mq.il.uil.UILServerILService] Setting up the UILClientIL Connection
      2002-09-23 15:21:19,215 DEBUG [org.jboss.mq.il.uil.UILServerILService] The UILClientIL Connection is set up
      2002-09-23 15:21:19,498 WARN [org.jboss.mq.il.uil.UILServerILService] Connection failure (1).
      java.net.SocketException: Connection reset
      at java.net.SocketInputStream.read(SocketInputStream.java:168)
      at java.net.SocketInputStream.read(SocketInputStream.java:182)
      at java.io.DataInputStream.readShort(DataInputStream.java:320)
      at org.jboss.mq.il.uil.multiplexor.StreamDemux.pumpData(StreamDemux.java:124)
      at org.jboss.mq.il.uil.multiplexor.DemuxInputStream.read(DemuxInputStream.java:87)
      at org.jboss.mq.il.uil.multiplexor.DemuxInputStream.read(DemuxInputStream.java:122)
      at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
      at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
      at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2133)
      at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2316)
      at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2383)
      at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2455)
      at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2604)
      at java.io.ObjectInputStream.readByte(ObjectInputStream.java:845)
      at org.jboss.mq.il.uil.UILServerILService.run(UILServerILService.java:228)
      at java.lang.Thread.run(Thread.java:536)

      This is my *-destinations-service.xml file:



      <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager








      This is the client code (MDB methods are never reached):

      private static final String QUEUE_CONNECTION_FACTORY_NAME = "UILConnectionFactory";
      private static final String QUEUE_NAME = "queue/PolypolAuditLogQueue";
      Hashtable env = new Hashtable();
      env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
      env.put("java.naming.factory.url.pkgs", "org.jboss.naming");
      env.put("java.naming.provider.url", "xxxxxxxxxxxx:1099");
      InitialContext initialContext = new InitialContext(env);
      QueueConnectionFactory factory = (QueueConnectionFactory)
      initialContext.lookup(QUEUE_CONNECTION_FACTORY_NAME);
      QueueConnection connection = factory.createQueueConnection();
      session = connection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
      queue = (Queue) initialContext.lookup(QUEUE_NAME);
      entry = ...
      ObjectMessage objectMessage = session.createObjectMessage();
      objectMessage.setObject(entry);
      QueueSender sender = session.createSender(queue);
      sender.send(objectMessage);

      Does anybody know what I am doing wrong???

      Thanks in advance,
      Michael