Skip to main content

Support & downloads  >  

java.lang.NoSuchFieldError: msgToken error occurs when trying to send message from WebSphere Application Server V6.0 to a WebSphere MQ V6 queue.

 Technote (troubleshooting)
 
Problem(Abstract)
The problem occurs because of a version mismatch between the IBM WebSphere MQ Java™ client jars and the WebSphere MQ server.

A stack trace similar to the following will be logged in the SystemOut.log:

Exception thrown : java.lang.NoSuchFieldError: msgToken
at com.ibm.mq.server.MQSESSION.init_conversion(Native Method)
at com.ibm.mq.server.MQSESSION.<clinit>(MQSESSION.java:254)
at
com.ibm.mq.MQSESSIONServer.getMQSESSION(MQSESSIONServer.java:
at com.ibm.mq.MQSESSION.getSession(MQSESSION.java:493)
 
Cause
WebSphere Application Server V6.0 includes the WebSphere MQ V5.3 jars in the <WebSphere Application Server_install_ root>\lib\WMQ\java\lib directory.

The two jars are:
com.ibm.mq.jar
com.ibm.mqjms.jar

WebSphere Application Server V6.0 shipped prior to the release of WebSphere MQ V6 which is why it ships with the WebSphere MQ V5.3 jars.

The exception results because the WebSphere MQ V5.3 client does not recognize the new WebSphere MQ V6 'msgToken' field.

 
Resolving the problem
The solution to this problem is the following:

Change the WebSphere Application Server V6.0 <MQ_install_root> environment variable to point to the WebSphere MQ V6 jars. See the following list for the proper value depending on platform:

AIX:
/usr/mqm

Linux®/HP-UX®/Solaris®:
/opt/mqm

Windows (default):
C:\Program Files\IBM\WebSphere MQ

From the Administrative Console:
Environment -> WebSphere Variables -> Browse Nodes -> <node where WebSphere MQ V6 is installed> -> OK -> MQ_INSTALL_ROOT -> <value above> -> OK

Save the configuration and restart the server.

This change will allow WebSphere Application Server V6.0 to pick up the proper version of the MQ client jars.

 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application ServersRuntimes for Java TechnologyJava SDK
 
 

Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.
Rate this page
Please take a moment to complete this form to help us better serve you.
This material provides me with the information I need.




This material is clear and easy to understand.




Did the information help you to achieve your goal?
What updates, improvements, or related information would you like to see in this document?
Your response will be used to improve our document content. Requests for assistance, if applicable, should be submitted through your normal support channel as we cannot respond from this site.
Input the verification number to submit feedback:
Document information
 Product categories:
 Software
 Application Servers
 Distributed Application & Web Servers
 WebSphere Application Server
 Java Message Service (JMS)
 Operating system(s):
  AIX, HP-UX, Linux, Solaris, Windows
 Software version:
  6.0, 6.0.1, 6.0.2
 Software edition:
  Base, Enterprise, Express, Network Deployment, WebSphere Business Integrations Server Foundation
 Reference #:
  1221195
 IBM Group:
 Software Group
 Modified date:
 2005-10-31

Translate My Page
 
 

Rate this page

Help us improve this page. Your response will be used to improve our document content. Requests for assistance, if applicable, should be submitted through your normal support channel as we cannot respond from this site.