Author |
Message
|
AlexeiSkate |
Posted: Thu Feb 06, 2003 3:10 pm Post subject: Java application cannot find MQM.dll file ? |
|
|
Centurion
Joined: 10 Apr 2002 Posts: 123
|
I want to have my Java application running on one machine do a get/put with MQSeries installed on another machine. I downloaded the supportpac MA88: MQSeries classes for Java, wrote my java program with the required import statement, compiled it fine but when I attempt to run it, I got an error that The dynamic link library MQM.dll could not be found in the specified path ..... The MQM.dll isn't installed with the MA88 support pac. I think I would have to install an MQSeries server on my machine in order to access that. Shouldn't I be able to write a Java program running as a client on one machine and connect to MQSeries queue on a different machine without needing MQM.dll? Is there something else that I need to load on the machine that's running the Java application? Thanks in advance for any help.[/quote] |
|
Back to top |
|
 |
nimconsult |
Posted: Thu Feb 06, 2003 11:08 pm Post subject: |
|
|
 Master
Joined: 22 May 2002 Posts: 268 Location: NIMCONSULT - Belgium
|
If you want to run MQSeries as a client, then you need to install MQSeries client
Nicolas _________________ Nicolas Maréchal
Senior Architect - Partner
NIMCONSULT Software Architecture Services (Belgium)
http://www.nimconsult.be |
|
Back to top |
|
 |
kingdon |
Posted: Fri Feb 07, 2003 5:29 am Post subject: |
|
|
Acolyte
Joined: 14 Jan 2002 Posts: 63 Location: UK
|
The Java interfaces (for either the Java MQI or for JMS) can be installed and run without having to install the other client software. The confusion arises because the Java classes can be used to make either client (tcp/ip) connections or local connections via JNI and C. It looks like the application is attempting make a local connection instead of a client one, so the solution is to reconfigure the application to use client connections instead. For the Java MQI you do this either by setting the MQEnvironment or by configuring a properties hashtable passed to the MQQueueManager constructor (I'd recommend the latter approach). For JMS, the settings are on the connection factory.
Regards,
James. |
|
Back to top |
|
 |
yaakovd |
Posted: Fri Feb 07, 2003 6:18 am Post subject: |
|
|
Partisan
Joined: 20 Jan 2003 Posts: 319 Location: Israel
|
To run Java application on clent computer you need:
com.ibm.mq.jar - using MQ classes
com.ibm.mq.jar, com.ibm.mqbind.jar, com.ibm.mqjms.jar - using jms
Make sure that your application is not looking for local QMgr (if you provide correct hostname etc). _________________ Best regards.
Yaakov
SWG, IBM Commerce, Israel |
|
Back to top |
|
 |
bower5932 |
Posted: Fri Feb 07, 2003 7:15 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
There is an mqhash.java in the repository that sets the client environment up in a hash table. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Fri Feb 07, 2003 9:05 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Or you can set the variables directly (for client mode).
To use client mode in your Java code, you need the following lines:
Code: |
MQEnvironment.hostname = "192.168.10.200";
MQEnvironment.channel = "SYSTEM.DEF.SVRCONN";
MQEnvironment.port = 1414; |
later
Roger... _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
AlexeiSkate |
Posted: Mon Feb 10, 2003 11:40 am Post subject: |
|
|
Centurion
Joined: 10 Apr 2002 Posts: 123
|
Thanks for everyone's reply. I set the MQEnvironment variables and it worked. |
|
Back to top |
|
 |
|