ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General Discussion » javax.jms.JMSException: MQJMS2008: failed to open MQ queue

Post new topic  Reply to topic
 javax.jms.JMSException: MQJMS2008: failed to open MQ queue « View previous topic :: View next topic » 
Author Message
navjot
PostPosted: Mon Feb 06, 2006 11:35 pm    Post subject: javax.jms.JMSException: MQJMS2008: failed to open MQ queue Reply with quote

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
View user's profile Send private message
Empeterson
PostPosted: Tue Feb 07, 2006 8:04 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
Toronto_MQ
PostPosted: Tue Feb 07, 2006 8:05 am    Post subject: Reply with quote

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
View user's profile Send private message
navjot
PostPosted: Tue Feb 07, 2006 10:00 pm    Post subject: Is Queue rqd for Pub-Sub in Test Enviornment and embedded MQ Reply with quote

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
View user's profile Send private message
RogerLacroix
PostPosted: Tue Feb 07, 2006 10:18 pm    Post subject: Re: Is Queue rqd for Pub-Sub in Test Enviornment and embedde Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3253
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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » javax.jms.JMSException: MQJMS2008: failed to open MQ queue
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.