How to resolve the issue 'UnicodeLittle [java.io.UnsupportedEncodingException]' in MQ Plugin Listener Activity.
book
Article ID: KB0079841
calendar_today
Updated On:
Products
Versions
TIBCO ActiveMatrix BusinessWorks Plug-in for IBM MQ
-
Description
When consuming the message having unsupported CCSID using MQ Plugin Listener Activity, we might get 'UnicodeLittle [java.io.UnsupportedEncodingException]' error in MQ client trace due to unsupported character set in the incoming messages. Also on plugin side it will throw error as 'IOError extracting the message body contents; possible incorrect character set'. Sample snippet from the MQ client trace: ================================================= [06/11/18 03:41:40.279.07] 0002 UnicodeLittle [java.io.UnsupportedEncodingException] at: [06/11/18 03:41:40.279.07] 0002 com.ibm.mq.jmqi.system.JmqiCodepage.getJmqiCodepage(JmqiCodepage.java:692) [06/11/18 03:41:40.279.07] 0002 com.ibm.mq.jmqi.system.JmqiCodepage.getJmqiCodepage(JmqiCodepage.java:507) [06/11/18 03:41:40.279.07] 0002 com.ibm.mq.MQMessage.getCodepage(MQMessage.java:3051) [06/11/18 03:41:40.279.07] 0002 com.ibm.mq.MQMessage.readStringOfByteLength(MQMessage.java:1169) [06/11/18 03:41:40.279.07] 0002 com.tibco.plugin.bwmq.impl.MqClient.creatOutputNode(MqClient.java:1235) [06/11/18 03:41:40.279.07] 0002 com.tibco.plugin.bwmq.impl.MqClient.getSingleMessage(MqClient.java:942) [06/11/18 03:41:40.279.07] 0002 com.tibco.plugin.bwmq.SubscriberActivityBase$Poller.getMessageBatch(SubscriberActivityBase.java:826) [06/11/18 03:41:40.279.07] 0002 com.tibco.plugin.bwmq.SubscriberActivityBase$Poller.itsTime(SubscriberActivityBase.java:775) [06/11/18 03:41:40.279.07] 0002 com.tibco.pe.util.ReminderQueue.run(Unknown Source) [06/11/18 03:41:40.279.07] 0002 Object ClassLoader = null [06/11/18 03:41:40.279.07] 0002 CurrentThread ClassLoader = sun.misc.Launcher$AppClassLoader@764c12b6 =================================================
Suppose you are using MQ client libraries 8.0.0.7 and using Listener Activity of MQ Plugin to consume the messages and incoming message has a character set as 1200. Since MQ client libraries v8.0.0.7 doesn't support character set 1200, Listener Activity will not able to consume the message with the error 'IOError extracting the message body contents; possible incorrect character set' on BW side and in MQ client trace we will get above error.
Issue/Introduction
How to resolve the issue 'UnicodeLittle [java.io.UnsupportedEncodingException]' in MQ Plugin Listener Activity.
Resolution
To resolve this issue, make sure that the MQ Client libraries which supports the character set i.e CCSID used in the incoming Messages are used in BW or if possible change the character set of the incoming message.