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.

When I double click on wmqtool*.exe, it gives me error "Could not find the main class. Program will exit." OR nothing happens.

 

When I try to connect to a queue manager in new version of WMQTool, I get MQ Error, reason code 2009, Connection is broken.

 

NoSuchMethod error.

 

Unable to load message catalog - mqji

 

OutOfMemory Error

 

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.

 

NoClassDefFoundError.

 

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.

 

When I double click on wmqtool*.exe, it gives me error "Could not find the main class. Program will exit." OR nothing happens.

 

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.

When I try to connect to a queue manager in new version of WMQTool, I get MQ Error, reason code 2009, Connection is broken.

 

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.

 

NoSuchMethod error.

 

 

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

 

OutOfMemory Error:

 

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

 

NoClassDefFoundError.

 

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.

  1. Download SecExit.dll from the download page. If you are going to install Security Exit for a queue manager on a platform other than Windows, you need to download SecExit.c source file. Please make changes as per the platform, if required and compile it.
  2. On MQ server, place this dll into the ‘Exits’ folder which is in root folder of MQSeries/WebSphere MQ  installation.
  3. With WMQTool Ver 4.0, you can define your own Server Connection Channel while defining the queue manager connection. In older versions, WMQTool first tries to connect the Server Connection Channel that of name of the queue manager it is trying to connect. If it is not successful, it tries to connect thru SYSTEM.ADMIN.SVRCONN. If it is still not successful, it tries SYSTEM.DEF.SVRCONN. (From Ver 4.0, SYSTEM.DEF.SVRCONN is no longer used for this purpose in WMQTool.)
  4. 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.

  1. The client side of Security exit is already there in WMQTool. So you do not have to do anything for it. WMQTool can automatically detect if there is any Security exit installed or not.
  2. Now revoke all the authorities of the user of that queue manager by the WebSphere MQ control command setmqaut. For example, for queue manager 'LOCALQM' and userid ‘Test’,

    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.

  1. Create a key file OR a shared file to authorize users in your network. Click here to refer to the documentation for detailed description of how to create it.
  2. Test it with Security Exit Name set in Server Connection Channel. Also test it after removing it from it to make sure that no unauthorized person can have access to it.

 

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:

 

  1. If WMQTool is running now, exit it.
  2. Delete or remove the corrupted key file from the WMQTool directory.
  3. Start WMQTool. It will show only 'Root' in the queue manager tree.

If you have installed Security Exit ...

  1. Click on Tools/Set Authorities/Key file. Follow the instructions displayed.

If you have NOT installed Security Exit ...

  1. Without doing anything else, simply click on 'Save Settings' button (floppy icon) from the tool bar at the top. Wait till it displays successful message.

It may ask you, want to restore it from last backup, respond to 'Yes'.

  1. Exit WMQTool.
  2. Restart WMQTool. You should see your queue manager information tree back.

 

 

 

 

For a Shared file:

 

  1. Start WMQTool. Select Tools/Set Authorities/Shared file.
  2. Click on Set Queue Manager Tree button. It will show your previous queue manager tree. Hit Ok button.
  3. Click on Set Authority Groups button. Create a new authority group. Enter authority group name, Select Authorities and then add all the queue managers displayed in window by clicking 'Add Queue Manager' button. Click Ok when you are done.
  4. Create a new user by Set Users button. Assign the above created authority group to the user. Click Ok button when done.
  5. Click on 'Save' and follow instructions.
  6. Select this authority file by Tools/Select Authority File.
  7. Exit and restart WMQTool.

 

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.