Author |
Message
|
tcganesh |
Posted: Thu Sep 26, 2002 6:13 am Post subject: MQ Java Error 2184 |
|
|
 Novice
Joined: 12 Sep 2002 Posts: 13 Location: New York
|
I am trying to do a PUT message using MQ Java classes.
Yesterday everything was working fine. But now I get a error message as below.
I would appreciate your inputs.
Attaching Code and Error Message.
import java.io.*;
import com.ibm.mq.*;
public class MQTest3
{
int options = MQC.MQOO_FAIL_IF_QUIESCING | MQC.MQOO_OUTPUT;
public MQTest3 (String manager, String q)
{
try
{
MQQueueManager mgr = new MQQueueManager(manager);
int maxLen = mgr.getMaximumMessageLength();
System.out.println("Max Msg Length for qMgr = " + maxLen);
MQQueue queue = mgr.accessQueue(q, options);
MQMessage msg = new MQMessage();
msg.format = MQC.MQFMT_STRING;
try
{
msg.writeString("This is my first test message from Java...");
}
catch(IOException ignore)
{
ignore.printStackTrace();
}
queue.put(msg);
queue.close();
mgr.disconnect();
}
catch (MQException e)
{
e.printStackTrace();
System.out.println("Completion Code: " + e.completionCode + " reason: " + e.reasonCode);
}
}
public static void main(String args[])
{
new MQTest3(args[0],args[1]);
}
}
ERROR MESSAGE
D:\JavaMQTest\GaneshMQTest>java MQTest3 PAC1 TLQ3
Max Msg Length for qMgr = 4194304
Unable to load message catalog - mqji
com.ibm.mq.MQException: Message catalog not found
at com.ibm.mq.MQQueueManager.accessQueue(MQQueueManager.java:1365)
at com.ibm.mq.MQQueueManager.accessQueue(MQQueueManager.java:1410)
at MQTest3.<init>(MQTest3.java:16)
at MQTest3.main(MQTest3.java:40)
Completion Code: 2 reason: 2184 _________________ Thanks,
Ganesh C |
|
Back to top |
|
 |
bduncan |
Posted: Thu Sep 26, 2002 8:44 am Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
You say "yesterday everything was working fine." What changed between yesterday and today? Were any changes made to the code or queue manager configuration, patch level, etc., or did it simply stop working without anything apparently changing? _________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
tcganesh |
Posted: Thu Sep 26, 2002 10:26 am Post subject: Installed J2EESDK |
|
|
 Novice
Joined: 12 Sep 2002 Posts: 13 Location: New York
|
I did install Java J2EE SDK for EJB's, JMS other J2EE to work.
Will this affect MQ anyway.
I checked the classpath that too looks fine.
Any other info needed I can help with. _________________ Thanks,
Ganesh C |
|
Back to top |
|
 |
tcganesh |
Posted: Thu Sep 26, 2002 10:37 am Post subject: Remote Queue Missing Remote Q Property |
|
|
 Novice
Joined: 12 Sep 2002 Posts: 13 Location: New York
|
Thanks Duncan.
I checked all Channel and Q Defns. I found I had cleared the Remote Q Name for Remote Definition.
Once I put in It worked fine.
I appreciate your site I get fast and good response for all Posts. _________________ Thanks,
Ganesh C |
|
Back to top |
|
 |
vennela |
Posted: Thu Sep 26, 2002 10:38 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Try "MSender.java" program from the repository. Download it and compile it. See if anything goes wrong. Downloading J2EE shouldn't affect I guess. If you are able to run MSender.java then your code has to to be looked into. I don't see particularly anything wrong.
Can you put test messages to the queue you are trying using API Exerciser?
Did you limit the number of messages that TLQ3 can take and did you exceed the limit. ?
Did you "put ihibit" the queue?
---
Venny |
|
Back to top |
|
 |
vennela |
Posted: Thu Sep 26, 2002 10:41 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Well,
That was quick
Glad you got it to working
---
Venny |
|
Back to top |
|
 |
|