APAR status
Closed as program error.
Error description
An IBM MQ classes for JMS application is attempting to connect to a queue manager which is running in the CCSID 437 character encoding scheme. The application makes a call to the JMS method: javax.jms.ConnectionFactory.createConnection("myUser", passwd); where 'passwd' is a String variable which contains characters which cannot be encoded in the queue manager's CCSID, 437. The application fails to connect to the queue manager, with an "javax.jms.JMSException" being thrown back to the application, with the following message and Java stack: CC=2;RC=2330;AMQ6047: Conversion not supported. [1=java.lang.String,2=437(IBM437) Unmappable Action: REPORT, Unmappable Replacement: 63, spaceByte: 32] [com.ibm.mq.jmqi.JmqiException] at: com.ibm.mq.jmqi.internal.JmqiDC.writeFieldDC com.ibm.mq.jmqi.internal.JmqiDC.writeField com.ibm.mq.jmqi.remote.rfp.RfpUID.setPassword com.ibm.mq.jmqi.remote.impl.RemoteConnection.sendUidFlow com.ibm.mq.jmqi.remote.impl.RemoteConnection.initSess com.ibm.mq.jmqi.remote.impl.RemoteConnection.connect com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSes sionFromNewConnection com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSes sion com.ibm.mq.jmqi.remote.impl.RemoteConnectionPool.getSession com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect com.ibm.mq.ese.jmqi.InterceptedJmqiImpl.jmqiConnect com.ibm.mq.ese.jmqi.ESEJMQI.jmqiConnect com.ibm.msg.client.wmq.internal.WMQConnection.<init> com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createV7Pr oviderConnection com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProv iderConnection com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl._createCon nection com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createConn ection com.ibm.mq.jms.MQConnectionFactory.createCommonConnection com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection myPackage.myApplication.myMethod No error messages are reported in the queue manager logs, and it is very difficult to determine the problem from the information provided in the JMSException.
Local fix
Use the following runmqsc command on the queue manager: ALTER QMGR CCSID(xxx) to change the queue manager CCSID to one that supports the characters being used in the password.
Problem summary
**************************************************************** USERS AFFECTED: Users of the IBM MQ classes for Java or IBM MQ classes for JMS, who are connecting to a remote queue manager which is running in CCSID for which the user password which is to be flowed from the Java/JMS application to the queue manager cannot be encoded in. Platforms affected: MultiPlatform **************************************************************** PROBLEM DESCRIPTION: When a IBM MQ classes for Java/JMS application connects to a queue manager, depending on the configuration of the system a "user identifier" flow may be sent from the application to the queue manager. For example, when using the IBM MQ classes for JMS v9.1, when the following JMS method is made: javax.jms.ConnectionFactory.createConnection("userid", "password"); in the default configuration as part of the connection process to the remote queue manager, the user password: "password" is converted into bytes, using the character encoding scheme matching the queue manager's CCSID. However, not all characters can be encoded into some character encoding schemes. For example, if the password contained the EURO SIGN (U+20AC) as in the following password String: 12345? and the queue manager is running in CCSID 437, which has no corresponding byte for the EURO SIGN character, then the MQ classes for JMS would throw an exception to say that the connection attempt has failed. The exception stack would have the form: com.ibm.msg.client.jms.DetailedIllegalStateException: JMSWMQ0018: Failed to connect to queue manager 'specificCcsidQmgr' with connection mode 'Client' and host name 'myHost.myDomain(1416)'. Check the queue manager is started and if running in client mode, check there is a listener running. Please see the linked exception for more information. at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException at com.ibm.msg.client.wmq.common.internal.Reason.createException at com.ibm.msg.client.wmq.internal.WMQConnection.<init> at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createV7Pr oviderConnection at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProv iderConnection at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl._createCon nection at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createConn ection at com.ibm.mq.jms.MQConnectionFactory.createCommonConnection at com.ibm.mq.jms.MQConnectionFactory.createConnection at MyApplication.myMethod Caused by: com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2330' ('MQRC_CODED_CHAR_SET_ID_ERROR'). at com.ibm.msg.client.wmq.common.internal.Reason.createException(Re ason.java:203) ... 10 more Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2330;AMQ9204: Connection to host 'myHost.myDomain(1416)' rejected. [1=com.ibm.mq.jmqi.JmqiException[CC=2;RC=2330;AMQ6047: Conversion not supported. [1=java.lang.String,2=437(IBM437) Unmappable Action: REPORT, Unmappable Replacement: 63, spaceByte: 32]],3=myhost.myDomain(1416),5=JmqiDC.writeFieldDC] at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect at com.ibm.mq.ese.jmqi.InterceptedJmqiImpl.jmqiConnect at com.ibm.mq.ese.jmqi.ESEJMQI.jmqiConnect at com.ibm.msg.client.wmq.internal.WMQConnection.<init> ... 9 more Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2330;AMQ6047: Conversion not supported. [1=java.lang.String,2=437(IBM437) Unmappable Action: REPORT, Unmappable Replacement: 63, spaceByte: 32] at com.ibm.mq.jmqi.internal.JmqiDC.writeFieldDC at com.ibm.mq.jmqi.internal.JmqiDC.writeField at com.ibm.mq.jmqi.remote.rfp.RfpUID.setPassword at com.ibm.mq.jmqi.remote.impl.RemoteConnection.sendUidFlow at com.ibm.mq.jmqi.remote.impl.RemoteConnection.initSess at com.ibm.mq.jmqi.remote.impl.RemoteConnection.connect at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSes sionFromNewConnection at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSes sion at com.ibm.mq.jmqi.remote.impl.RemoteConnectionPool.getSession at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect ... 13 more Caused by: java.nio.charset.UnmappableCharacterException: Input length = 1 at java.nio.charset.CoderResult.throwException at java.nio.charset.CharsetEncoder.encode at com.ibm.mq.jmqi.system.JmqiCodepage.stringToBytes at com.ibm.mq.jmqi.internal.JmqiDC.writeFieldDC ... 22 more By itself, this error does not provide sufficient information for the user to be able to determine the cause of the problem. Similar to APAR IT25917: https://www.ibm.com/support/docview.wss?uid=swg1IT25917 which was for an encoding problem with the username, an improved error message is desired for the unencodable password scenario.
Problem conclusion
The MQ classes for Java/JMS has been updated, such that when this error condition arises, the exception stack which is returned to the application will contain the new message: AMQ9568: Unable to convert the user password into bytes, using the queue manager character encoding scheme of CCSID 'xxx' For example in the case with a queue manager running in CCSID 437, you will see one of the exception "Caused by" stacks of the form: Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2330;AMQ9568: Unable to convert the user password into bytes, using the queue manager character encoding scheme of CCSID '437'. [2=437] at com.ibm.mq.jmqi.remote.rfp.RfpUID.setPassword at com.ibm.mq.jmqi.remote.impl.RemoteConnection.sendUidFlow at com.ibm.mq.jmqi.remote.impl.RemoteConnection.initSess at com.ibm.mq.jmqi.remote.impl.RemoteConnection.connect at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSes sionFromNewConnection at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSes sion at com.ibm.mq.jmqi.remote.impl.RemoteConnectionPool.getSession at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect --------------------------------------------------------------- The fix is targeted for delivery in the following PTFs: Version Maintenance Level v8.0 8.0.0.12 v9.0 LTS 9.0.0.7 v9.1 CD 9.1.2 v9.1 LTS 9.1.0.2 The latest available maintenance can be obtained from 'WebSphere MQ Recommended Fixes' http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006037 If the maintenance level is not yet available information on its planned availability can be found in 'WebSphere MQ Planned Maintenance Release Dates' http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006309 ---------------------------------------------------------------
Temporary fix
Comments
APAR Information
APAR number
IT27637
Reported component name
IBM MQ BASE M/P
Reported component ID
5724H7261
Reported release
910
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2018-12-31
Closed date
2019-01-23
Last modified date
2019-03-15
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
IBM MQ BASE MP
Fixed component ID
5724H7271
Applicable component levels
[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"910","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]
Document Information
Modified date:
15 March 2019