Throwing error When posting messages to MQ

book

Article ID: 4705

calendar_today

Updated On:

Products

CA Application Test Service Virtualization CA Continuous Application Insight (PathFinder) CA Service Virtualization (DevTest / LISA / VSE / Application Test)

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) 

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.

Environment

Release: LSASVR99000-9.5-LISA-Server
Component:

Resolution

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

<Please see attached file for image>

src="https://communities.ca.com/servlet/JiveServlet/showImage/2-241942881-105839/Screen+Shot+2016-12-06+at+1.34.47+AM.png" alt="">

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

<Please see attached file for image>

class="image-2 jive-image j-img-original" style="font-weight: inherit; font-style: inherit; font-family: inherit; height: 358px; width: 620px;" src="https://communities.ca.com/servlet/JiveServlet/downloadImage/2-241942881-105840/Screen+Shot+2016-12-06+at+1.35.27+AM.png" alt="" width="716" height="413">

 

Enter '1208':

<Please see attached file for image>

class="image-3 jive-image j-img-original" style="font-weight: inherit; font-style: inherit; font-family: inherit; height: auto;" src="https://communities.ca.com/servlet/JiveServlet/downloadImage/2-241942881-105841/Screen+Shot+2016-12-06+at+1.35.45+AM.png" alt="" width="503" height="404">

Additional Information

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

Attachments

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