0

I have a web-application deployed in Websphere AS 8.0(Host A) using spring-jms client accessing queues in WMQ 7.0 in remote machine(Host B). I have configured WMQ ConnectionFactory and WMQ Queues in JNDI using JMS Provider under Resources link with WMQ as Messaging Provider as per the instructions in WAS 8 administration guide. I have also tested it using Test Connection button. It works fine. I have configured JNDI template and QueueConnectionFactory and Queue(Destination), DestinationResolver and JMSTemplate as per Spring JMS configuration.

However when I try to run my server and access WMQ through JNDI it throws the following exception:

exception message JMSCC0085: A destination was not specified.; nested exception is **com.ibm.msg.client.jms.DetailedInvalidDestinationException**: JMSCC0085: A destination was not specified. with params [B@775e20e, 1c02f7440b8438e5]
org.springframework.jms.InvalidDestinationException:JMSCC0085:**A destination was not specified**.; nested exception is com.ibm.msg.client.jms.DetailedInvalidDestinationException:**JMSCC0085:A destination was not specified.**
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:469)
at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:534)
at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:526)

I tried to print my default destination name and it printed as queue://QM_MGR/Q1, where QM_MGR is name of queue manager and Q1 is name of queue in WMQ.

Please note that I have not configured any JNDI in WMQ, have not configured any InitialContextFactory and Provider URL in JNDI template and resource-ref in web.xml.

I had tried all the above and failed. So I had removed the above mentioned configurations.

Can any one help me by pointing out why I am getting this exception, what I am missing or detail out the steps to avoid this exception?. Thanks in advance.

ZAK
  • 31
  • 2
  • 6

2 Answers2

0

Although you have defined the connection factory and destinations in your JNDI, you have to define the MQ counterparts. For example an MQ queue manager by name QM_MGR must be created along with a SVRCONN channel and a listener running at a port, say 1414. Also a queue with name Q1 must be created on that queue manager.

Please check if you have done the above.

Shashi
  • 14,980
  • 2
  • 33
  • 52
  • Thanks for your reply. I have created the following MQ counter parts: Queue Manager: QM_MGR, Queues: Q1 and Q2, Channel: SYSTEM.AAA.CONFIG, Port: 1416. Anything else I missed? – ZAK Jun 18 '12 at 09:07
  • That's all. You can test it with MQ sample amqsputc to check if configuration correct or not. 1) In a command prompt(assuming Windows OS) set MQSERVER environment variable using SET MQSERVER=SYSTEM.AAA.CONFIG/TCP/(1416) (2) Then run command amqsputc Q1 QM_MGR. This will allow you send messages to queue Q1. – Shashi Jun 18 '12 at 09:41
  • Thanks for your quick reply. Both my WAS and WMQ are in different machines. How can I test the above from a different machine where WMQ resides?. Do i need any jars in my machine from where I will run the command?. Thanks in advance. – ZAK Jun 18 '12 at 10:01
  • Amqsputc is a C application. In your WAS machine, open a command prompt and run steps 1 and 2. – Shashi Jun 18 '12 at 10:19
  • It works fine when accessed from a client application in a local machine or even from a remote machine. But when I use JNDI configured using Spring JMS, it throws exception as org.springframework.jms.InvalidDestinationException:JMSCC0085:**A destination was not specified**.; nested exception is com.ibm.msg.client.jms.DetailedInvalidDestinationException:**JMSCC0085:A destination was not specified.**. Can you help me to fix this issue? – ZAK Jun 18 '12 at 11:26
0

I have fixed this issue. It was the JNDI namespace that caused the error. Thanks all.

ZAK
  • 31
  • 2
  • 6