Before you refer to following FAQs, please make sure that you have the latest version of wmqtool.exe file. Compare the build number you have with that of mentioned on download page.
Frequently Asked Questions:
How to setup CLASSPATH environmental variable ?
NoClassDefFoundError OR NoSuchMedhodError while running WMQTool 6.2.
Unable to load message catalog - mqji
How to run WMQTool when an older version of JRE/J2SDK is installed OR
Running two versions of Java in the same machine OR
Running WMQTool under JRE 1.4.1 or later without disturbing the current
When I try to connect a queue manager, I receive 'Unsupported encoding exception Cp437' error.
How to set Security in WMQTool ?
I lost my queue manager information tree OR
My key file/shared file is corrupted.
I am receiving an error while running WMQTool. Who should I report to ?
If I want a feature in WMQTool and if it is not available, what should I do ?
How to setup CLASSPATH environmental variable ?
(1) Create a folder named 'JARs' in your C: drive.
(2) Copy following jar files into that folder.
For WMQTool 7.0 and above ...
com.ibm.mq.jmqi.jar
com.ibm.mq.jar
com.ibm.mq.pcf.jar
com.ibm.mq.headers.jar
com.ibm.mq.commonservices.jar
connector.jar
All of the above jar files can be found at following location on WebSphere MQ V7 Server installation.
<WebSphere MQ Installation directory>/Java/lib
For older versions ...
com.ibm.mq.jar
com.ibm.mqbind.jar
com.ibm.mq.pcf.jar
connector.jar
(3) Create the environmental CLASSPATH variable as follows.
Click on Start/Settings/Control Panel.
Double click on 'System'.
Click on 'Advanced' tab.
Click on 'Environmental Variables' button.
Click on 'New' button.
Then enter 'CLASSPATH' as 'Variable name' and 'C:\JARs\com.ibm.mq.jar;C:\JARs\com.ibm.mqbind.jar;C:\JARs\com.ibm.mq.pcf.jar;C:\JARs\connector.jar;' in Variable value.
Then click on 'Ok' buttons to close all windows.
(4) Start the tool now.
NoClassDefFoundError or NoSuchMethodError while running WMQTool 6.2
These errors are very common when there is something wrong in defining all the required jar files in CLASSPATH environmental variable. Following jar files are required to be placed in CLASSPATH variable in the same order mentioned below. If you do not maintain the order, it will give you NoSuchMethodError.
com.ibm.mq.jar
com.ibm.mqbind.jar
com.ibm.mq.pcf.jar
connector.jar
If these jar files are placed in JARs directory in WMQTool directory, your CLASSPATH variable should contain following value, for example.
C:\WMQTool\JARs\com.ibm.mq.jar;C:\WMQTool\JARs\com.ibm.mqbind.jar;
C:\WMQTool\JARs\com.ibm.mq.pcf.jar;C:\WMQTool\JARs\connector.jar;
Note that all the jar files are written with its full absolute path.
Since WMQTool 6.1, use of wmqtool.bat is not required. The stand alone executable wmqtool*.exe should be executed by double clicking on it. If it fails, perform the following tasks.
(1) Find out your default java installation by entering following command in a Command Window.
java -version
(2) Download the right exe file depending upon this java version.
(3) Define an environmental variable JAVA_HOME pointing to your above java installation. For example, it might be...
SET JAVA_HOME=C:\Program Files\Java\j2sdk1.4.2_11
(4) Try to run the exe file. If it still fails, remove the 'charsets.jar' file from JARs directory and then try. It it works this time, it means that the 'charsets.jar' was not matching the java version of your java installation. You may want to place the right 'charsets.jar' from your java installation to the 'JARs' directory.
From WMQTool 4.0, the server connection channel SYSTEM.DEF.SVRCONN is no longer used to connect the queue manager for security reasons. So if your queue manager does not have a server connection channel named that of the queue manager or SYSTEM.ADMIN.SVRCONN, it will fail. Previously, it was successful because WMQTool used SYSTEM.DEF.SVRCONN to connect the queue manager. To resolve this, either you create a server connection channel named that of queue manager or SYSTEM.ADMIN.SVRCONN, OR enter another user-defined server connection channel name to 'Channel' field in the connection information of that queue manager. If you are using a shared file, you can do this by selecting Tools/Set Authorities/Shared file and then clicking on 'Set Queue Manager Tree' and then right click on the queue manager and 'modify' it. In the connection information window, you can enter 'Channel'.
If you are not using a shared file, you can directly right click on the queue manager entry on the tree and modify it.
This error is very common when you try to execute WMQTool with any older version of JRE/J2SDK than 1.4.1.
For WMQTool 2.0 and all later versions, Java 1.4.1 or later is required.
Install JRE/J2SDK 1.4.1 or later version and then run WMQTool.
Unable to load message catalog - mqji
This error is given when Java cannot find mqji.properties file. Place the path of this file into classpath to resolve. For example, if mqji.properties file resides in C:\j2sdk1.4.1\lib folder, you can correct the classpath in the WMQTool.bat file like this:
java -classpath C:\j2sdk1.4.1\lib;JARs\com.ibm.mq.jar;JARs\com.ibm.mq.pcf.jar;JARs\connector.jar;JARs\JH.jar;wmqtool.jar wmqtool.UserInterface.WMQTool
When you try to load a large size of message, you may receive error like...
"java.lang.OutOfMemoryError"
When using wmqtool.exe
To resolve this error, you need to increase the heap size of JVM. For this, create an ASCII text file named 'wmqtool.vmoptions' and enter following two lines in it.
-Xmx800m
-Xms700m
Place this file in WMQTool folder and restart the tool. If you still receive the error, you may want to increase the value in parameters. You may also put other JVM parameters sameway in the file.
When using wmqtool.jar
Modify the WMQTool.bat as follows:
start javaw -Xmx800m -Xms700m -classpath jars\;jars\com.ibm.mq.jar;jars\com.ibm.mq.pcf.jar;jars\connector.jar;jars\JH.jar;wmqtool.jar wmqtool.UserInterface.WMQTool
How to run WMQTool when an older version of JRE/J2SDK is installed OR
Running two versions of Java in the same machine OR
Running WMQTool under JRE 1.4.1 or later without disturbing the current version of Java installed
This is very simple. Install JRE 1.4.1 OR later version onto another machine. Then copy the folder JRE 1.4.1 or whatever, in the root directory of WMQTool. Set the WMQTool.bat as follows:
SET PATH = JRE 1.4.1\bin;JRE 1.4.1\lib;.;%PATH%;
start javaw –classpath jars\com.ibm.mq.jar;jars\com.ibm.mq.pcf.jar;jars\connector.jar;jars\crimson.jar;jars\xalan.jar;jars\activation.jar;jars\jh.jar;wmqtool.jar wmqtool.UserInterface.WMQTool
Following jar files are required to run WMQTool.
wmqtool.jar
com.ibm.mq.jar
com.ibm.mq.pcf.jar
connector.jar
jh.jar
If you have not provided correct paths for each of the above jar file, you will receive following NoClassDefFoundError errors.
If wmqtool.jar is missing you will receive...
"Exception in thread "main" java.lang.NoClassDefFoundError: wmqtool/UserInterface/WMQTool"
If com.ibm.mq.jar is missing you will receive ...
"Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/mq/MQEnvironment..."
If com.ibm.mq.pcf.jar is missing you will receive...
"Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/mq/pcf/PCFException..."
If connector.jar is missing you will receive...
"Exception in thread "main" java.lang.NoClassDefFoundError: javax/resource/ResourceException..."
If jh.jar is missing you will receive...
"Exception in thread "main" java.lang.NoClassDefFoundError: javax/help/HelpBroker"
So please make sure that above jar files are put in your classpath while running WMQTool.
When I try to connect a queue manager, I receive 'Unsupported encoding exception Cp437' error.
This is due to problem with 'charsets.jar'. Find the jar file from your Java installation or download it in the wmqtoool.zip file. Place it in 'JARs' directory inside WMQTool installation directory. If you still receive the error message, try to find the latest version of it from your Java installation.
How to set Security in WMQTool ?
WMQTool’s current version uses Security Exit to secure queue managers. It has been tested only on Windows platforms. For all other platforms, you need to modify the source code SecExit.c and compile it on that platform.
To setup it successfully, please perform following steps very carefully.
Modify the Server Connection channel. Enter ‘SecExit(CHANNELEXIT)’ in the field ‘Security Exit Name’ exactly same. Please be very perfect in spelling and letter case as C is case sensitive.
setmqaut -m LOCALQM -t qmgr -p Test -all
If you do not revoke authorities of users, users can create their own key file/shared file and can perform all admin work on queue managers what you can do.
I lost my queue manager information tree OR
My key file/shared file is corrupted.
This was a known issue with earlier versions of WMQTool. WMQTool stores queue manager connection information and users' ids and passwords in encrypted form using Java's Cryptography and then converting it into Base64. If for any reason, WMQTool fails to decrypt the stored information back to original one, it thinks the file is corrupted. Then there is no way to decrypt it correctly.
From WMQTool 3.0 and all later versions, WMQTool confirms that it is decrypted properly before writing the information to the file. So it is possible that while saving a key file or a shared file, WMQTool displays message saying it was unsuccessful and asks you if you want to try again. You should select 'yes' until it becomes successful.
If your key file/shared file is corrupted and WMQTool cannot read it any more, you can still get your queue manager tree back. WMQTool creates a text file 'QMSettings.txt' in WMQTool directory. This file holds the information about your queue manager information. It does not have any information about the user and its password. To retrieve information from QMSettings.txt, perform the following steps.
For a key file:
If you have installed Security Exit ...
If you have NOT installed Security Exit ...
It may ask you, want to restore it from last backup, respond to 'Yes'.
For a Shared file:
I am receiving an error while running WMQTool. Who should I report to ?
You may write an email to atul@niratul.com. If the error is critical, you may download the jar file again from the website. It is possible that it might already have been fixed. You can compare the Build number displayed in the menu Help/About WMQTool with your current one to know if there is any more release of wmqtool.jar file.
If I want a feature in WMQTool and if it is not available, what should I do ?
Write an email to atul@niratul.com.