'IBM MQ Issue: JMSMQ1113 The destination does not have a name set

In a spring JMS project, I try to connect to an IBM MQ QUEUE placed in a remote server. The code can reach the IBM MQ server and recognize the MQ Manager, but when it tried to communicate with the QUEUE which its name is mentioned in .bindings file (this file is generated in the IBM MQ Server, and I copied it into local folder, and I mentioned the name of this folder as a JNDI resource), I got the following error:

INFO - Setup of JMS message listener invoker failed for destination 'TI.UNIT1.ENQ.IN' - trying to recover. Cause: JMSMQ1113: Aucun nom n'est défini pour la destination.
com.ibm.msg.client.jms.DetailedJMSException: JMSMQ1113: Aucun nom n'est défini pour la destination. Tentative d'utilisation d'une file d'attente ou d'une rubrique MQ créée à l'aide du constructeur par défaut. Un nom doit avoir été défini pour que la file d'attente puisse être utilisée. Après la création, définissez un nom dans la file d'attente ou la rubrique MQ.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:411)
    at com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:390)
    at com.ibm.mq.jms.MQDestination.validateDestination(MQDestination.java:1455)
    at com.ibm.mq.jms.MQQueueSession.createReceiver(MQQueueSession.java:118)
    at org.springframework.jms.listener.DefaultMessageListenerContainer102.createConsumer(DefaultMessageListenerContainer102.java:102)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.createListenerConsumer(AbstractPollingMessageListenerContainer.java:221)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.initResourcesIfNecessary(DefaultMessageListenerContainer.java:1005)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:981)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:974)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:876)
    at java.lang.Thread.run(Thread.java:744)

I have made a deep google search but with no effective solution.


@JoshMc thank you again :) This is what I've got when I type "type .bindings | findstr TI.UNIT1.ENQ.IN" :

TI.UNIT1.ENQ.IN/RefAddr/7/Encoding=String
TI.UNIT1.ENQ.IN/RefAddr/17/Content=0
TI.UNIT1.ENQ.IN/RefAddr/13/Content=2`enter code here`
TI.UNIT1.ENQ.IN/RefAddr/3/Encoding=String
TI.UNIT1.ENQ.IN/RefAddr/11/Encoding=String
TI.UNIT1.ENQ.IN/RefAddr/8/Content=0
TI.UNIT1.ENQ.IN/RefAddr/6/Type=ENC
TI.UNIT1.ENQ.IN/RefAddr/11/Type=MDW
TI.UNIT1.ENQ.IN/RefAddr/18/Type=RCCS
TI.UNIT1.ENQ.IN/RefAddr/9/Encoding=String
TI.UNIT1.ENQ.IN/RefAddr/11/Content=false
TI.UNIT1.ENQ.IN/RefAddr/13/Encoding=String
TI.UNIT1.ENQ.IN/FactoryName=com.ibm.mq.jms.MQQueueFactory
TI.UNIT1.ENQ.IN/RefAddr/5/Type=TC
TI.UNIT1.ENQ.IN/RefAddr/6/Content=273
TI.UNIT1.ENQ.IN/RefAddr/10/Type=MDR
TI.UNIT1.ENQ.IN/RefAddr/2/Content=-2
TI.UNIT1.ENQ.IN/RefAddr/17/Type=RTOST
TI.UNIT1.ENQ.IN/RefAddr/19/Encoding=String
TI.UNIT1.ENQ.IN/RefAddr/15/Encoding=String
TI.UNIT1.ENQ.IN/RefAddr/0/Encoding=String
TI.UNIT1.ENQ.IN/RefAddr/4/Type=CCS
TI.UNIT1.ENQ.IN/RefAddr/16/Type=QMGR
TI.UNIT1.ENQ.IN/RefAddr/4/Content=1208
TI.UNIT1.ENQ.IN/RefAddr/0/Content=7
TI.UNIT1.ENQ.IN/RefAddr/18/Content=1208
TI.UNIT1.ENQ.IN/RefAddr/6/Encoding=String
TI.UNIT1.ENQ.IN/RefAddr/14/Content=-1
TI.UNIT1.ENQ.IN/RefAddr/17/Encoding=String
TI.UNIT1.ENQ.IN/RefAddr/2/Encoding=String
TI.UNIT1.ENQ.IN/RefAddr/10/Encoding=String
TI.UNIT1.ENQ.IN/RefAddr/9/Content=2
TI.UNIT1.ENQ.IN/RefAddr/3/Type=PER
TI.UNIT1.ENQ.IN/RefAddr/15/Type=PAALD
TI.UNIT1.ENQ.IN/RefAddr/8/Encoding=String
TI.UNIT1.ENQ.IN/ClassName=com.ibm.mq.jms.MQQueue
TI.UNIT1.ENQ.IN/RefAddr/16/Content=
TI.UNIT1.ENQ.IN/RefAddr/12/Content=0
TI.UNIT1.ENQ.IN/RefAddr/4/Encoding=String
TI.UNIT1.ENQ.IN/RefAddr/12/Encoding=String
TI.UNIT1.ENQ.IN/RefAddr/2/Type=PRI
TI.UNIT1.ENQ.IN/RefAddr/7/Content=1
TI.UNIT1.ENQ.IN/RefAddr/9/Type=MBODY
TI.UNIT1.ENQ.IN/RefAddr/3/Content=-2
TI.UNIT1.ENQ.IN/RefAddr/14/Type=RAALD
TI.UNIT1.ENQ.IN/RefAddr/18/Encoding=String
TI.UNIT1.ENQ.IN/RefAddr/14/Encoding=String
TI.UNIT1.ENQ.IN/RefAddr/10/Content=false
TI.UNIT1.ENQ.IN/RefAddr/1/Type=EXP
TI.UNIT1.ENQ.IN/RefAddr/8/Type=WCFMT
TI.UNIT1.ENQ.IN/RefAddr/5/Content=0
TI.UNIT1.ENQ.IN/RefAddr/13/Type=RACP
TI.UNIT1.ENQ.IN/RefAddr/1/Content=-2
TI.UNIT1.ENQ.IN/RefAddr/19/Content=1
TI.UNIT1.ENQ.IN/RefAddr/15/Content=-1
TI.UNIT1.ENQ.IN/RefAddr/5/Encoding=String
TI.UNIT1.ENQ.IN/RefAddr/16/Encoding=String
TI.UNIT1.ENQ.IN/RefAddr/1/Encoding=String
TI.UNIT1.ENQ.IN/RefAddr/0/Type=VER
TI.UNIT1.ENQ.IN/RefAddr/7/Type=FIQ
TI.UNIT1.ENQ.IN/RefAddr/12/Type=MDCTX
TI.UNIT1.ENQ.IN/RefAddr/19/Type=RCNV

You are right, it missed TI.UNIT1.ENQ.IN in TI.UNIT1.ENQ.IN/RefAddr/16/Content= I added the missing QUEUE name like this TI.UNIT1.ENQ.IN/RefAddr/16/Content=TI.UNIT1.ENQ.IN but I still get the same previous error.



Solution 1:[1]

The error with english description is:

MSMQ1113: The destination does not have a name set. An attempt was made to use a MQQueue or MQTopic that was created with the default constructor. A name should have then been set before the queue was used. After creation set a name on the MQQueue or MQTopic.

Have you verified the that a JNDI resource with the name TI.UNIT1.ENQ.IN is included in the .binding file and that it references a valid IBM MQ Queue name?

The .binding file is a text file and one way to look at it is to just sort it, each JNDI entry will be made up of a number of lines.

You may have something similar to the following in your file:

TI.UNIT1.ENQ.IN/RefAddr/12/Content=TI.UNIT1.ENQ.IN
TI.UNIT1.ENQ.IN/RefAddr/12/Content/Encoding=String
TI.UNIT1.ENQ.IN/RefAddr/12/Type=QU

If a entry like this is missing or the right side of the Content= missing it could cause a problem like you are describing.

I found this post on IBM's developerWorks Forums "More information on JMSMQ1113 please" with an answer from IBM's Matthew B White to have helpful information.


Update 1

You mention changing Content= on the following entry to the queue name, that is not correct since this entry is Type=QMGR which would be the base queue manager name, you can and should leave this blank in most instances, MQ will always try to find the queue first on the queue manager you connect to.

TI.UNIT1.ENQ.IN/RefAddr/16/Content=
TI.UNIT1.ENQ.IN/RefAddr/16/Encoding=String
TI.UNIT1.ENQ.IN/RefAddr/16/Type=QMGR

You are missing an entry that is like the following with Type=QU which would reference the IBM MQ queue name.

TI.UNIT1.ENQ.IN/RefAddr/12/Content=TI.UNIT1.ENQ.IN
TI.UNIT1.ENQ.IN/RefAddr/12/Content/Encoding=String
TI.UNIT1.ENQ.IN/RefAddr/12/Type=QU

You should go back and look at how you are generating the .binding file to see if you are missing something.

If you use JMSAdmin to generate the .binding file, the command would look something like this at a minimum:

DEF Q(TI.UNIT1.ENQ.IN) QUEUE(TI.UNIT1.ENQ.IN)

Q is the JNDI resource name (it does not have to match the queue name). QUEUE is the name of the IBM MQ queue that is associated with the JNDI resource name.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1