|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
javax.jms.JMSException: MQJMS2008: failed to open MQ queue |
« View previous topic :: View next topic » |
Author |
Message
|
navjot |
Posted: Mon Feb 06, 2006 11:35 pm Post subject: javax.jms.JMSException: MQJMS2008: failed to open MQ queue |
|
|
Newbie
Joined: 31 Jan 2006 Posts: 5
|
Hi
I am using test server enviornment of websphere 5.1 and embedded MQ.
Cofigured the Topic Connection Factory and Topic. Getting following error-
HI...working fine com.ibm.mq.jms.MQTopicConnectionFactory@93b86773
HI...1
HI...2
HI...111
Exception in thread "P=546534:O=0:CT" javax.jms.JMSException: MQJMS2008: failed to open MQ queue
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:540)
at com.ibm.mq.jms.MQBrokerSubscriptionEngine.sendBrokerMessageInternal(MQBrokerSubscriptionEngine.java:2546)
at com.ibm.mq.jms.MQBrokerSubscriptionEngine.sendBrokerMessageInternal(MQBrokerSubscriptionEngine.java:2747)
at com.ibm.mq.jms.MQBrokerSubscriptionEngine.setDeferredMessage(MQBrokerSubscriptionEngine.java:2851)
at com.ibm.mq.jms.MQBrokerSubscriptionEngine.openSubscription(MQBrokerSubscriptionEngine.java:230)
at com.ibm.mq.jms.MQSession.createTSubscriber(MQSession.java:4580)
at com.ibm.mq.jms.MQTopicSession.createSubscriber(MQTopicSession.java:780)
at Client.main(Client.java:41)
Code is following...
/*
* Created on Jan 30, 2006
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
/**
* @author baweja
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
import javax.jms.*;
import javax.naming.*;
public class Client {
public static void main(String[] args) throws JMSException,NamingException {
System.out.println("HI");
TopicConnectionFactory connectionFactory =
(TopicConnectionFactory)new InitialContext().lookup("theTopicConnectionFactory");
System.out.println("HI...working fine "+ connectionFactory);
TopicConnection connection = connectionFactory.createTopicConnection();
connection.start();
TopicSession topicSession =
connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
// topicSession.start();
System.out.println("HI...1" );
Topic topic =
(Topic)new InitialContext().lookup("theTopic");
TopicPublisher publisher = topicSession.createPublisher(topic);
System.out.println("HI...2" );
Message message = topicSession.createMessage();
message.setJMSType("logMessage");
message.setLongProperty("time", System.currentTimeMillis());
message.setStringProperty("subject", "testing messaging");
message.setStringProperty("message", "testing MDB");
System.out.println("HI...111" );
final TopicSubscriber subscriber = topicSession.createSubscriber(topic);
System.out.println("HI...222" );
System.out.println("HI...3" );
publisher.publish(message);
System.out.println("HI...4" );
System.out.println("Waiting for message...");
final TextMessage message1 = (TextMessage) subscriber.receive();
// To prove that a message have been received
// output it to System.out
System.out.println("Message received:");
System.out.println(message1);
publisher.close();
topicSession.close();
connection.close();
System.out.println("Message sent");
}
}
Getting following error at server startup----
[2/7/06 13:22:06:027 IST] 3092233c JMSEmbeddedPr A MSGS0051I: Queue Manager open for business
[2/7/06 13:22:06:059 IST] 3092233c JMSEmbeddedPr A MSGS0052I: Starting the Broker
[2/7/06 13:22:06:371 IST] 3092233c BrokerManager E MSGS0255E: Broker Manager unable to attach to Queue Manager - unknown Queue
[2/7/06 13:22:06:418 IST] 3092233c JMSService E MSGS0001E: Starting the JMS Server failed with exception: com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2085 |
|
Back to top |
|
 |
Empeterson |
Posted: Tue Feb 07, 2006 8:04 am Post subject: |
|
|
Centurion
Joined: 14 Apr 2003 Posts: 125 Location: Foxboro, MA
|
Is the queue name correct? A 2085 error means MQRC_UNKNOWN_OBJECT_NAME. _________________ IBM Certified Specialist: MQSeries
IBM Certified Specalist: Websphere MQ Integrator |
|
Back to top |
|
 |
Toronto_MQ |
Posted: Tue Feb 07, 2006 8:05 am Post subject: |
|
|
 Master
Joined: 10 Jul 2002 Posts: 263 Location: read my name
|
2085 = UNKNOWN OBJECT NAME = The queue doesn't exist
Cheers
Steve |
|
Back to top |
|
 |
navjot |
Posted: Tue Feb 07, 2006 10:00 pm Post subject: Is Queue rqd for Pub-Sub in Test Enviornment and embedded MQ |
|
|
Newbie
Joined: 31 Jan 2006 Posts: 5
|
I am working on Topic for pub-sub....Do I need to configure a Queue..???I have configured topic and topic connection factory...... |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Feb 07, 2006 10:18 pm Post subject: Re: Is Queue rqd for Pub-Sub in Test Enviornment and embedde |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
navjot wrote: |
I am working on Topic for pub-sub....Do I need to configure a Queue..???I have configured topic and topic connection factory...... |
Your kidding, right?
Time for you to read the manuals:
- WMQ Using Java
- WMQ Publish Subscribe User's Guide
Regards,
Roger Lacroix _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|