UnmappableCharacterException when posting messages to MQ in DEVTEST
search cancel

UnmappableCharacterException when posting messages to MQ in DEVTEST

book

Article ID: 4705

calendar_today

Updated On:

Products

CA Application Test CA Continuous Application Insight (PathFinder)

Issue/Introduction

Created a virtual service which uses IBM Native send/receive step. Configured Queue details properly and used a Devtest property which hold the payload data and added it in content tab to publish message to MQ server. When trying to publish this message from VS, getting below error

| Unable to write inner payload: Input length = 1 
============================================================================ 
| Step: SendOutboundPaymentRequest 
---------------------------------------------------------------------------- 
| Message: Unable to write inner payload: Input length = 1 
---------------------------------------------------------------------------- 
| Trapped Exception: Unable to write inner payload: Input length = 1 
| Trapped Message: 

============================================================================ 
| Exception: 
============================================================================ 
| Message: Unable to write inner payload: Input length = 1 
---------------------------------------------------------------------------- 
| Trapped Exception: Input length = 1 
| Trapped Message: java.nio.charset.UnmappableCharacterException: Input length = 1 
---------------------------------------------------------------------------- 
STACK TRACE 
java.nio.charset.UnmappableCharacterException: Input length = 1 
at java.nio.charset.CoderResult.throwException(CoderResult.java:282) 
at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:816) 
at com.ibm.mq.jmqi.system.JmqiCodepage.stringToBytes(JmqiCodepage.java:703) 
at com.ibm.mq.MQMessage.writeString(MQMessage.java:2746) 
at com.itko.lisa.messaging.providers.ibmmq.payload.IbmMqMessagePayload.writeBodyToHeaderObject(IbmMqMessagePayload.java:652) 
at com.itko.lisa.messaging.providers.ibmmq.payload.IbmMqMessagePayload.writeBodyToHeaderObject(IbmMqMessagePayload.java:73) 

Environment

Release: Devtest 10.6 and up
Component:

Cause

By default character-set used in MQ step is "ISO 8951-1/ASCII". Since the back-end queue is not accepting this character set for payload data, getting an error.

Resolution

   Change character set to UTF-8 for payload data using below changes to resolve this issue.

 

Click '+' -> 'Advanced' -> 'Character set':

 

Enter '1208':

 

Additional Information

https://communities.ca.com/message/241942545

Attachments

1558707042833000004705_sktwi1f5rjvs16qju.png get_app
1558707040873000004705_sktwi1f5rjvs16qjt.png get_app
1558707038567000004705_sktwi1f5rjvs16qjs.png get_app