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 » IBM MQ Java / JMS » resource allocation exception what doe this mean ??

Post new topic  Reply to topic
 resource allocation exception what doe this mean ?? « View previous topic :: View next topic » 
Author Message
joecherian
PostPosted: Thu Jan 16, 2003 6:45 am    Post subject: resource allocation exception what doe this mean ?? Reply with quote

Novice

Joined: 15 Dec 2002
Posts: 23
Location: India

Hello
when i tried to create a Queuereciever as follows, then i got the exception as
tmpQReceiver =(MQQueueReceiver)m_Session.createReceiver(m_Queue[nQueueReceiverIndex],
"JMSMessageID ='"+ strMessgId+"'");
(where strMessgId = messageID)

javax.jms.ResourceAllocationException: MQJMS2008: failed to open MQ queue
at com.ibm.mq.jms.MQQueueSession.getQueueOpenException(MQQueueSession.java:823)
at com.ibm.mq.jms.MQQueueSession.createReceiver(MQQueueSession.java:295)



what could be the reason ??

please help..

Thanks

Joe
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
bower5932
PostPosted: Thu Jan 16, 2003 9:12 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

Catch the linked exception and post it here:
Code:

} catch( JMSException je ) {
     /*******************************************/
     /* Catch and display exception information */
     /*******************************************/
     System.out.println("JMSException: " + je);
     Exception le = je.getLinkedException();
     if (le != null) System.out.println("Linked exception: " + le);
}
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
joecherian
PostPosted: Thu Jan 16, 2003 7:53 pm    Post subject: Reply with quote

Novice

Joined: 15 Dec 2002
Posts: 23
Location: India

Hello,
thanks , i found out the reason.pls see the following code..

for (int i = 0;i < 10000;++i)
{
strMessgId = (String)MessageIDObj.m_vMessageID.get(ixInner);
//create the receiver with the messageID obtained from the vector
tmpQReceiver =(MQQueueReceiver)m_Session.createReceiver(m_Queue[nQueueReceiverIndex],
"JMSMessageID ='"+ strMessgId+"'");
txtMsgIn = (JMSBytesMessage)m_Session.createBytesMessage();
//recieve the message using the Queuereciever object
txtMsgIn = (JMSBytesMessage)tmpQReceiver.receive(1);
}


in my crashed source it was as above,

now i added two more statements to the loop as follows..

tmpQReceiver.close();
tmpQReceiver = null ;

now that crashing is gone..

earlier when it crashed, i found that after 240 iterations it crashed each time..is there any significance for this number 240..?

now it is solved.. but i wasted alot of time for that

thanks again

Joe
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » resource allocation exception what doe this mean ??
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.