Author |
Message
|
milind |
Posted: Wed Jan 29, 2003 4:24 pm Post subject: Unable to load message catalog - mqji |
|
|
Newbie
Joined: 29 Jan 2003 Posts: 6
|
I have java/mq application where i am expecting particular message on the queue. If there are no messages on the queue that is the valid case for me. So when the mqget throws exception because of 2033 , while handling that exception i am just ignoring the 2033 exception sothat i can proceed further and do the rest of the job. The application is working fine but when i am starting the application the first time i am getting the above message.
Unable to load message catalog - mqji.
Please let me know if anybody has any idea on this.
Milind. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Wed Jan 29, 2003 8:55 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
It is looking for the directory with the mqji*.properties files.
You need to add the java\lib directory to your CLASSPATH environment variable. Do not include the property filenames. i.e.
Code: |
SET CLASSPATH=C:\Program Files\IBM\MQSeries\Java\lib;%CLASSPATH% |
later
Roger... _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
milind |
Posted: Thu Jan 30, 2003 7:41 am Post subject: |
|
|
Newbie
Joined: 29 Jan 2003 Posts: 6
|
Hi Roger,
Thanks for your help. Now i am able to get rid of the message. But
now i am getting the more clear message
"MQJE001: Completion Code 2, Reason 2033"
But this what my application is expecting so can you help me out to get rid of this message.
Milind. |
|
Back to top |
|
 |
yaakovd |
Posted: Thu Jan 30, 2003 8:09 am Post subject: |
|
|
Partisan
Joined: 20 Jan 2003 Posts: 319 Location: Israel
|
The 2033 "error" is really not an error, it is more of an MQSeries return status:
MQRC_NO_MSG_AVAILABLE 2033
The MQ program is polling a queue looking for a message, but there are no messages available.
You can catch this exception:
catch (MQException ex1) {
if (ex1.reasonCode == 2033)
{
// use your code for this case
} _________________ Best regards.
Yaakov
SWG, IBM Commerce, Israel |
|
Back to top |
|
 |
milind |
Posted: Thu Jan 30, 2003 8:15 am Post subject: |
|
|
Newbie
Joined: 29 Jan 2003 Posts: 6
|
Yes i agree that it is not an error. In my application i have a wait interval of 15 seconds. So as it is continuous running program(java) it always showing this message ("MQJE001: Completion Code 2, Reason 2033") when it is trying to get the message from the queue. I would like to get rid of this message. |
|
Back to top |
|
 |
milind |
Posted: Thu Jan 30, 2003 8:17 am Post subject: |
|
|
Newbie
Joined: 29 Jan 2003 Posts: 6
|
Here is my code
try {
MQMessage retrievedMessage = new MQMessage();
MQGetMessageOptions gmo = new MQGetMessageOptions();
gmo.options = MQC.MQGMO_WAIT;
gmo.waitInterval = WaitInterval;
systemInputLocalQueue.get(retrievedMessage, gmo);
int strLen = retrievedMessage.getDataLength();
retrievedMessage.seek(0);
bytes = new byte[strLen];
retrievedMessage.readFully(bytes);
lastApplicationIdData = retrievedMessage.applicationIdData;
} catch (MQException mqx) {
if ( mqx.reasonCode != 2033 ){
throw new ISMQException("MQ Error from reading a message from a queue. CompletionCode=" + mqx.completionCode + ", ReasonCode=" + mqx.reasonCode,mqx);
} }catch (IOException iox) {
throw new ISMQException("IOException from reading a message from a queue.");
} catch (Exception x) {
throw new ISMQException("Unknown Error from reading a message from a queue.");
}
return bytes;
} |
|
Back to top |
|
 |
clindsey |
Posted: Thu Jan 30, 2003 9:57 am Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
MQEnvironment.disableTracing ();
MQException.log = null;
Add these 2 lines early in your code.
Charlie |
|
Back to top |
|
 |
milind |
Posted: Thu Jan 30, 2003 11:00 am Post subject: |
|
|
Newbie
Joined: 29 Jan 2003 Posts: 6
|
Thanks charlie i got it.
Its working fine now.
Thank you all for your support. |
|
Back to top |
|
 |
|