4 Replies Latest reply on Dec 3, 2002 6:28 AM by anilpriya

    org.jboss.mq.SpyJMSException: Cannot create a ConnectionRece

    anilpriya

      Hello everyone,

      I have a specific problem when jms clients connecting to jbossmq server.

      I used the sample queue provided by jbossmq server named "testQueue"

      I had used two client programs given in the jms tutorials of http://java.sun.com/jms

      1. SimpleQueueSender.java(message sender)
      2. SimpleQueueReceiver.java(message receiver)

      To connect to the jbossmq server:

      My jndi lookup looks like below in both the files


      try {
      Properties props = new Properties();
      props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      props.put(Context.PROVIDER_URL, "152.152.152.80:1099");
      Context jndiContext = new InitialContext(props);
      QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory)
      jndiContext.lookup("ConnectionFactory");
      Queue queue = (Queue) jndiContext.lookup("queue/testQueue");
      }
      catch (NamingException e)
      {
      }




      Then i started the receiver in one window and it is waiting for the arrival of messages into the queue. In another window i started my message sender which sends number of textmessages according to the commandline parameter entered.In machines with java version 1.3.x it is working fine.

      In machines with java version 1.4.x it is giving the following exception

      Exception occurred: org.jboss.mq.SpyJMSException: Cannot create a ConnectionReceiver


      Please help me out. I want to know whether i am doing anything wrong or it is a bug in jms implementation in jbossmq.


      with thanks & regards

      anil