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 API Support » Cannot connect --Unable to load message catalog - mqji

Post new topic  Reply to topic
 Cannot connect --Unable to load message catalog - mqji « View previous topic :: View next topic » 
Author Message
harshmahey
PostPosted: Sat Sep 13, 2003 7:40 am    Post subject: Cannot connect --Unable to load message catalog - mqji Reply with quote

Newbie

Joined: 26 Aug 2003
Posts: 5

Hi im new to MQ Series and trying to just send a msg to the queqe and thats it .
------------------------------------
This is the Code
------------------------------------
package com.mqseries;

import com.ibm.mq.*;

/**
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: </p>
* @author not attributable
* @version 1.0
*/

public class trial {
public trial() {
}

public static void main(String[] args) {
trial trial1 = new trial();
init();
}

public static void init() {
try{
MQQueueManager qMgr = null;
MQQueue sndQueue = null;
MQQueue rcvQueue = null;
String mqHostName = "10.56.250.36";
String qMgrName = "QM_wlp12041";
String channelName = "S_wlp12041";
// String channelName = "TO_QM_wlp12041";

String reqQName = "aaaaaaaaaaaaaaa";
String userID = " "; // 12 spaces.
String userPWD = " "; // 8 spaces.
boolean traceEnabled = false;
String traceFile = "/tmp/mq.log";
int traceLevel = 5; // 1 to 5 (with most detailed) DF changed

MQEnvironment.hostname = mqHostName;
MQEnvironment.channel = channelName;
MQEnvironment.userID = userID;
MQEnvironment.password = userPWD;
//MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY,MQC.TRANSPORT_MQSERIES);
MQEnvironment.properties.put (MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_CLIENT);
// try {
qMgr = new MQQueueManager(qMgrName);
MQMessage sndMsg = new MQMessage();
int openOptions = MQC.MQOO_OUTPUT | MQC.MQOO_SET_IDENTITY_CONTEXT |
MQC.MQOO_FAIL_IF_QUIESCING;
/*
sndQueue = qMgr.accessQueue(reqQName, openOptions, qMgrName,
null, null);
*/
MQQueue queue = qMgr.accessQueue(reqQName, openOptions, qMgrName,
null, null);
MQMessage message = new MQMessage();
message.writeUTF("This is a test message from Java");
queue.put(message);
qMgr.disconnect();
}
catch (Exception exp) {
System.out.println("Exp.."+exp);
exp.printStackTrace();
}

}

------------------------------------
This is the Exception
------------------------------------

C:\JBuilder9\jdk1.4\bin\javaw -classpath "C:\Documents and Settings\zprx929\jbproject\mqseries\classes;C:\lib\providerutil.jar;C:\lib\com.ibm.mqjms.jar;C:\lib\connector.jar;C:\lib\fscontext.jar;C:\lib\jms.jar;C:\lib\jndi.jar;C:\lib\jta.jar;C:\lib\ldap.jar;C:\lib\com.ibm.mq.jar;C:\lib\comm.jar;C:\lib\crimson.jar;C:\lib\dom4j.jar;C:\lib\jaxp-api.jar;C:\lib\jconn2.jar;C:\lib\log4j-1.2.7.jar;C:\lib\log4j-core.jar;C:\lib\log4j.jar;C:\lib\xml-writer.jar;C:\lib\xml4j.jar;C:\jdk1.2.2\lib\dt.jar;C:\jdk1.2.2\lib\tools.jar;C:\JBuilder9\jdk1.4\demo\jfc\Java2D\Java2Demo.jar;C:\JBuilder9\jdk1.4\demo\plugin\jfc\Java2D\Java2Demo.jar;C:\JBuilder9\jdk1.4\jre\lib\charsets.jar;C:\JBuilder9\jdk1.4\jre\lib\ext\dnsns.jar;C:\JBuilder9\jdk1.4\jre\lib\ext\ldapsec.jar;C:\JBuilder9\jdk1.4\jre\lib\ext\localedata.jar;C:\JBuilder9\jdk1.4\jre\lib\ext\sunjce_provider.jar;C:\JBuilder9\jdk1.4\jre\lib\im\indicim.jar;C:\JBuilder9\jdk1.4\jre\lib\jaws.jar;C:\JBuilder9\jdk1.4\jre\lib\jce.jar;C:\JBuilder9\jdk1.4\jre\lib\jsse.jar;C:\JBuilder9\jdk1.4\jre\lib\rt.jar;C:\JBuilder9\jdk1.4\jre\lib\sunrsasign.jar;C:\JBuilder9\jdk1.4\lib\dt.jar;C:\JBuilder9\jdk1.4\lib\htmlconverter.jar;C:\JBuilder9\jdk1.4\lib\tools.jar" -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=wlp12041:3264,suspend=y com.mqseries.trial
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.mqseries.trial.init(trial.java:55)
at com.mqseries.trial.main(trial.java:20)
Exp..com.ibm.mq.MQException: Message catalog not found
----------------------------------------

Can you please tell me what is wrtong where.
Thanks
Harsh
harshmahey@hotmail.com
Back to top
View user's profile Send private message Send e-mail MSN Messenger
EddieA
PostPosted: Mon Sep 15, 2003 2:37 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Adding the MQ\java\lib directory (looks like C:\lib for you) to your classpath will get rid of the mqji message catalog error.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
Keka
PostPosted: Tue Sep 16, 2003 6:17 am    Post subject: Reply with quote

Voyager

Joined: 28 Dec 2002
Posts: 96

Add the below two lines in your code in the beginning.
This will disable internal MQ tracing and resolve the error..

MQEnvironment.disableTracing ();
MQException.log = null;
_________________
Keka
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Cannot connect --Unable to load message catalog - mqji
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.