Author |
Message
|
mchan |
Posted: Mon Oct 03, 2011 7:46 pm Post subject: JMSCC0085 A destination was not specified. |
|
|
Apprentice
Joined: 09 Sep 2011 Posts: 29
|
I hit the JMS exception "JMSCC0085 A destination was not specified. " when try to send a message to queue via JMS in MQv7.
Can't find any explanation from info centre or other news group.
Anybody has any idea? I did specific the correct queue name in session.createQueue call.
Thanks |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Oct 03, 2011 7:54 pm Post subject: Re: JMSCC0085 A destination was not specified. |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mchan wrote: |
I hit the JMS exception "JMSCC0085 A destination was not specified. " when try to send a message to queue via JMS in MQv7.
Can't find any explanation from info centre or other news group.
Anybody has any idea? I did specific the correct queue name in session.createQueue call.
Thanks |
Show us the code  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mchan |
Posted: Mon Oct 03, 2011 9:35 pm Post subject: |
|
|
Apprentice
Joined: 09 Sep 2011 Posts: 29
|
My code is straight forward
Quote: |
try {
factory = new MQQueueConnectionFactory();
((MQQueueConnectionFactory) factory).setHostName(hostname);
((MQQueueConnectionFactory) factory).setPort(port);
((MQQueueConnectionFactory) factory).setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
((MQQueueConnectionFactory) factory).setQueueManager(qManager);
((MQQueueConnectionFactory) factory).setChannel(chnlName);
((MQQueueConnectionFactory) factory).setClientID(channelId);
System.out.println("Creating a Connection");
connection = factory.createQueueConnection();
// IMPORTANT: Receive calls will be blocked if the connection is
// not explicitly started, so make sure that we do so!
System.out.println("Starting the Connection");
connection.start();
boolean transacted = false;
session = connection.createQueueSession( transacted,
Session.AUTO_ACKNOWLEDGE);
log.info("Create Queue: "+qName);
queue = session.createQueue( qName );
System.out.println("Created a session");
QueueSender queueSender = session.createSender(queue);
System.out.println("Created a QueueSender");
TextMessage outMessage = session.createTextMessage();
...
queueSender.send(outMessage);
} catch (JMSException e) {
System.out.println("JMSException occured:" +e.getMessage());
log.info(e.getMessage());
log.info(e.getLinkedException().getMessage());
log.info(e.getStackTrace().toString());
e.printStackTrace();
}
|
On the call of session.createTextMessage(), the following is thrown
Quote: |
Exception Msg: JMSCC0085: A destination was not specified.
com.ibm.msg.client.jms.DetailedInvalidDestinationException: JMSCC0085: A destination was not specified.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:522)
at com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:313)
at com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:388)
at com.ibm.msg.client.jms.internal.JmsErrorUtils.createException(JmsErrorUtils.java:104)
at com.ibm.msg.client.jms.internal.JmsSessionImpl.createQueue(JmsSessionImpl.java:1259)
at com.ibm.mq.jms.MQSession.createQueue(MQSession.java:614)
at mqp2pserv.MQP2PServ.run(MQP2PServ.java:210)
at java.lang.Thread.run(Thread.java:811)
JMS Error code: JMSCC0085
JMS Explanation: null
JMS Explanation: null
|
|
|
Back to top |
|
 |
rekarm01 |
Posted: Tue Oct 04, 2011 1:16 am Post subject: Re: JMSCC0085 A destination was not specified. |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
mchan wrote: |
On the call of session.createTextMessage(), the following is thrown
Quote: |
com.ibm.msg.client.jms.DetailedInvalidDestinationException: JMSCC0085: A destination was not specified.
...
at com.ibm.mq.jms.MQSession.createQueue(MQSession.java:614) |
|
Before the call to createTextMessage(), it looks like createQueue() threw an Exception.
mchan wrote: |
I did specific the correct queue name in session.createQueue call. |
Show the code for that. |
|
Back to top |
|
 |
mchan |
Posted: Tue Oct 04, 2011 1:31 am Post subject: |
|
|
Apprentice
Joined: 09 Sep 2011 Posts: 29
|
Sorry and Thanks for your help....
actually I just found that I have another call when open another queue with an empty queue name. |
|
Back to top |
|
 |
|