Announcement Announcement Module
Collapse
No announcement yet.
WebSphere MQ + org.springframework.jms.InvalidDestinationExceptio n: MQJMS2008 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment


    • #3
      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.

      Comment


      • #4
        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

        Comment

        Working...
        X