Results 1 to 4 of 4

Thread: WebSphere MQ + org.springframework.jms.InvalidDestinationExceptio n: MQJMS2008

  1. #1
    Join Date
    Sep 2006
    Posts
    5

    Default WebSphere MQ + org.springframework.jms.InvalidDestinationExceptio n: MQJMS2008

    I'm using JmsTemplate102 to connect to a WebSphere MQ and read messages with the following config:

    Code:
      	
    <bean id="jmsQueueConnectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory">
      		<property name="transportType" value="1"/>
      		<!--<property name="queueManager" value="${queueManager}"/>--> 
      		<property name="hostName" value="${host}" />
      		<property name="channel" value="${channel}"/> 
      	</bean>
    
        <!-- JMS Queue Template -->
        <bean id="jmsQueueTemplate" class="org.springframework.jms.core.JmsTemplate102">
            <property name="connectionFactory">
                <ref bean="jmsQueueConnectionFactory"/>
            </property>
            <property name="defaultDestination">
              <ref bean="jmsDestinationResolver"/>
            </property>
            <!--
            <property name="pubSubDomain">
                <value>false</value>
            </property>
            <property name="receiveTimeout">
                <value>20000</value>
            </property>
            -->
        </bean>
    
        <bean id="jmsDestinationResolver" class="com.ibm.mq.jms.MQQueue">
        	<constructor-arg value="${queueName}" />
        </bean>    
    
          <bean id="jmsReceiver" class="springexample.client.JMSReceiver">
            <property name="jmsTemplate102">
              <ref bean="jmsQueueTemplate"/>
            </property>
          </bean>
    But it throws the following exception when I try to connect:

    Code:
      	
    org.springframework.jms.InvalidDestinationException: MQJMS2008: failed to open MQ queue ; nested exception is javax.jms.InvalidDestinationException:
     MQJMS2008: failed to open MQ queue ; nested exception is com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2085
         javax.jms.InvalidDestinationException: MQJMS2008: failed to open MQ
    queue
         at com.ibm.mq.jms.MQQueueServices.getQueueOpenException(MQQueueS
    ervices.java:408)
         at com.ibm.mq.jms.JMSServicesMgr.getQueueOpenException(JMSServic
    esMgr.java:112)
         at com.ibm.mq.jms.MQSession.createQReceiver(MQSession.java:5915)
    
         at com.ibm.mq.jms.MQQueueSession.createReceiver(MQQueueSession.j
    ava:311)
         at org.springframework.jms.core.JmsTemplate102.createConsumer(Jm
    sTemplate102.java:192)
    I think I'm missing something because I can connect and view messages using a swing-app message browser (JMQBrowser).

    Any pointers from anyone is greatly appreciated

  2. #2

    Default

    2085 is MQException.MQRC_UNKNOWN_OBJECT_NAME. Suggests that the queue name or the queue manager name or the channel name are wrong or missing.

  3. #3
    Join Date
    Jan 2008
    Posts
    1

    Smile MQJE001: Completion Code 2, Reason 2085

    To the MQ & Spring Guru,
    I have a plain java app calling ClassPathXmlApplicationContext where the context-xml file has the ffg:

    <bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="jndiTemplate">
    <ref bean="jndiTemplate"/>
    </property>
    <property name="jndiName">
    <value>${java.qmanager.name}</value>
    </property>
    </bean>

    <!-- this a JNDI built destination used by the JMS Template -->
    <bean id="destination" class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="jndiTemplate">
    <ref bean="jndiTemplate"/>
    </property>
    <property name="jndiName">
    <value>MY.QUEUE.NAME.HERE</value>
    </property>
    </bean>

    <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
    <property name="environment">
    <props>
    <prop key="java.naming.factory.initial">com.ibm.mq.jms.c ontext.WMQInitialContextFactory</prop>
    <prop key="java.naming.provider.url">our_host:our_port/our_mq_channel</prop>
    </props>
    </property>
    </bean>



    It works in our unit and user-acceptance environment but fails w/ the 2085 in our production region. I tried debugging in my own workspace (RAD 6.0) pointing my queue configuration (q mgr, channel, port, etc) to the prod config. What's weird is it sometimes work, say 1 out of 5 tries, 4 times it fails with that 2085. We don't cluster our queues. Queue mgrs in test and prod are in two different servers (hosts), we're in MQ v6.

    Any ideas? Your help is much appreciated.

  4. #4
    Join Date
    Oct 2006
    Posts
    1

    Default

    Any updates regarding the 2085 issue? We appear to experience a similar situation and are stuck. Any help is appriciated.

    Code:
    MQJMS2008: failed to open MQ queue JMS_RequestResponseQueue;
    nested exception is javax.jms.InvalidDestinationException: MQJMS2008: failed to open
    MQ queue JMS_RequestResponseQueue; nested exception is com.ibm.mq.MQException:
    MQJE001: Completion Code 2, Reason 2085

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •