Author |
Message
|
kavithadhevi |
Posted: Wed Oct 23, 2002 6:07 am Post subject: unable to load message catalog-mqji |
|
|
 Master
Joined: 14 May 2002 Posts: 201 Location: USA
|
Hi,
I have seen the discussion for this particular error while running MQBase Java application. But i was able to see that the error gives a error code , but in my case it doesn't.
Also i have noticed that most of them suggested to its due to classpath , so i tried that too. But not able to fix it. I tried with mq.jar and mqbind.jar. Anyway here is my exception :
Unable to load message catalog - mqji
com.ibm.mq.MQException: Message catalog not found
at com.ibm.mq.MQClientManagedConnectionFactoryJ11._createManagedConnection(MQClientManagedConnectionFactoryJ11.java, Compiled Code)
at com.ibm.mq.MQClientManagedConnectionFactoryJ11.createManagedConnection(MQClientManagedConnectionFactoryJ11.java, Compiled Code)
at
com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java, Compiled Code)
at
com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java, Compiled Code)
at
com.ibm.mq.MQQueueManager.obtainBaseMQQueueManager(MQQueueManager.java, Compiled Code)
at
com.ibm.mq.MQQueueManager.construct(MQQueueManager.java, Compiled Code)
at
com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java, Compiled Code)
at
devmq.main(sdevmq.java, Compiled Code)
Anybody got an idea why ?  _________________ Thanks in Advance.
Kavitha
IBM Certified System Administrator
Websphere MQ v 5.3
www.zealphoenix.com |
|
Back to top |
|
 |
bower5932 |
Posted: Wed Oct 23, 2002 12:12 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
The "Unable to load message catalog - mqji" error is caused by the java path of MQ not being in your classpath. You should add <mqminstall>\java\lib to your classpath to get around this error. I'd also suggest catching the linked exception:
Code: |
} catch( JMSException je ) {
System.out.println("JMS Exception: " + je);
// check for a linked exception
Exception le = je.getLinkedException();
if (le != null) {
System.out.println("Linked exception: " + le);
}
}
|
This might show the actual problem. |
|
Back to top |
|
 |
kavithadhevi |
Posted: Thu Oct 24, 2002 5:36 am Post subject: |
|
|
 Master
Joined: 14 May 2002 Posts: 201 Location: USA
|
Thank you for the reply.
I am not using JMS, i am trying this using MQJava. I have set things right on Path and as well as in classpath . But i am not sure why it is giving this error. Any other ideas ? _________________ Thanks in Advance.
Kavitha
IBM Certified System Administrator
Websphere MQ v 5.3
www.zealphoenix.com |
|
Back to top |
|
 |
RogerLacroix |
Posted: Thu Oct 24, 2002 12:55 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
This is one of the most asked questions at mqseries.net - do a search (button - top-right on every page) for "load message catalog" and you will find your answer. (Missing entry in your classpath)
later
Roger... _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
kavithadhevi |
Posted: Fri Oct 25, 2002 5:42 am Post subject: |
|
|
 Master
Joined: 14 May 2002 Posts: 201 Location: USA
|
Hi Roger,
I did search , and i got hold of a solution from the discussion is to do with classpath setting. It seems like i am setting appropriately. But i am not sure why, And another thing is its not giving me any reason code. But it says that
Quote: |
Unable to load message catalog - mqji
com.ibm.mq.MQException: Message catalog not found |
this is my path setting :
export CLASSPATH=/opt/mqm/java/lib/com.ibm.mqbind.jar:/opt/mqm/java/lib/com.ibm.mq.jar:/opt/mqm/java/lib/connector.jar:.
export PATH=$PATH:/usr/tandem/java/bin:/opt/mqm/java/lib
javac -classpath ./com.ibm.mq.jar:./com.ibm.mqbind.jar:.connector.jar:.:/usr/tandem/java/lib mqbind1.java
java -classpath ./com.ibm.mq.jar:./com.ibm.mqbind.jar:.connector.jar:.:/usr/tandem/java/lib mqbind1
theres where i m confused. any thoughts. _________________ Thanks in Advance.
Kavitha
IBM Certified System Administrator
Websphere MQ v 5.3
www.zealphoenix.com |
|
Back to top |
|
 |
bkasisch |
Posted: Fri Oct 25, 2002 10:10 am Post subject: |
|
|
 Novice
Joined: 14 Oct 2002 Posts: 16
|
Have you looked in /opt/mqm/java/lib to see if the properties files are in this directory?
On my system they were installed in /mqm/java/lib (_no_ opt) |
|
Back to top |
|
 |
kavithadhevi |
Posted: Fri Oct 25, 2002 10:59 am Post subject: |
|
|
 Master
Joined: 14 May 2002 Posts: 201 Location: USA
|
Thanks for your information, i'll use mq.jar only.
Quote: |
And no i didnt find any files under /opt/mqm/lib .. what should i have to do ? . |
What do you mean when you refer to properties file means?
If you are talking about properties file used by the application, then my answer would be , no i am not using any properties file. Initially i am trying to connect and put/get message from the MQSeries server.
Happen to look at my classpath and Path setting , did i miss something ?
So if you some other properties file whats it. _________________ Thanks in Advance.
Kavitha
IBM Certified System Administrator
Websphere MQ v 5.3
www.zealphoenix.com |
|
Back to top |
|
 |
RogerLacroix |
Posted: Sun Oct 27, 2002 8:33 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
No. You are no setting it correctly. Did you look in the /opt/mqm/java/lib directory? If you did you would have noticed all of the MQSeries property files (mqji_*.properties).
Just to be clear, add /opt/mqm/java/lib to the end of your CLASSPATH.
e.g
export CLASSPATH=/opt/mqm/java/lib/com.ibm.mqbind.jar:/opt/mqm/java/lib/com.ibm.mq.jar:/opt/mqm/java/lib/connector.jar:.:/opt/mqm/java/lib
Also, either do export CLASSPATH=... or java -classpath ... because when you specify -classpath on the command line it OVERRIDES the environment variable (CLASSPATH). e.g. environment setting will not be used.
later
Roger... _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
kavithadhevi |
Posted: Mon Oct 28, 2002 11:35 am Post subject: |
|
|
 Master
Joined: 14 May 2002 Posts: 201 Location: USA
|
Hi,
Thank you all. Atlast i got it working, so now i am able to get the path and classpath settings right and the properties files right on place.
But i am getting 2059 , i tried all combinations of connection settings. Any idea ? I used mq with enivronment var set to channel, port and hostname etc. along with QM name specified, but no use. Please give me an idea. _________________ Thanks in Advance.
Kavitha
IBM Certified System Administrator
Websphere MQ v 5.3
www.zealphoenix.com |
|
Back to top |
|
 |
RogerLacroix |
Posted: Mon Oct 28, 2002 8:45 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Come on dude, crack open that manual. Or at least review the mountain of sample Java code that I freely make available at my web site.
Please review the section on MQEnvironment of Chapter 9 of the MQSeries Using Java manual.
Environment variables are NOT support under Java.
later
Roger... _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
kavithadhevi |
Posted: Tue Oct 29, 2002 5:52 am Post subject: |
|
|
 Master
Joined: 14 May 2002 Posts: 201 Location: USA
|
I guess i didnt make myself clear. I have everything set , and i have been using MQEnvironment .channel.. and MQEnvironment.hostname ... for a long long time. It works fine, but what i am not able to do is that working on tandem. It works fine on AIX and Windows env. i am trying this on tandem. Any idea why? _________________ Thanks in Advance.
Kavitha
IBM Certified System Administrator
Websphere MQ v 5.3
www.zealphoenix.com |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Oct 29, 2002 9:37 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Things to check:
- Is the queue manager running?
- Is the queue manager's listener running?
- Is the SVRCONN name valid?
- Are you sure that you have the correct port #?
I found on OS/400 that I had to put a valid UserId in the MCA field (not blank) of the SVRCONN channel to get my remote Java program to connect successfully.
later
Roger... _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
kavithadhevi |
Posted: Thu Oct 31, 2002 5:10 am Post subject: |
|
|
 Master
Joined: 14 May 2002 Posts: 201 Location: USA
|
Thank you all for your tips and suggestions.
Atlast i made MQBase Java work on Tandem.  _________________ Thanks in Advance.
Kavitha
IBM Certified System Administrator
Websphere MQ v 5.3
www.zealphoenix.com |
|
Back to top |
|
 |
mrlinux |
Posted: Thu Oct 31, 2002 12:43 pm Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
You didnt tell us how you solved the last issue ????? _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
kavithadhevi |
Posted: Fri Nov 01, 2002 5:50 am Post subject: |
|
|
 Master
Joined: 14 May 2002 Posts: 201 Location: USA
|
Sorry about that.
Here what happend, i was trying to implement Java on Tandem to use it for MQSeries Java application where not that many companies have implement such an environment for MQSeries. What we heard is less 5 companies in the world is using this type of environment. Theres were i got all the problem described above.
The base is you have to install the NSK JDK as root and unpack the MQM pack as root along with the classpath and linking. Even though the MQM id has given all the authorisation as local admin powers like in Windows, it didnt work. So you got be a root to install and do the linking.
I dont how far we will be able to test and implement MQBase Java working as we wanted to , but still we are putting some efforts to understand the legacy system with the new technology implemented. I hope on our process of our research we might find some thing new that i surely would post here , so it'll be useful for users those who are trying this environment setup.
I hope this to be a good start. and Thanks again i learn new things everyday from this forum, which directly and indirectly helps me solve and give me solutions for my problems. I encourage all the paticipants and Keep up the good work. _________________ Thanks in Advance.
Kavitha
IBM Certified System Administrator
Websphere MQ v 5.3
www.zealphoenix.com |
|
Back to top |
|
 |
|