AnsweredAssumed Answered

Getting (MQRC_HEADER_ERROR) when placing message into the queue

Question asked by narasimharao.x.lingam on Sep 28, 2017
Latest reply on Oct 15, 2017 by narasimharao.x.lingam

Hi @kevin.bowman,

 

Getting following error, when I am putting messages into MQ .

DevTest Solutions 9.5.1:

Following are the MQ header details received from Source system and trying to put the same while responding in IBM MQ native SendReceive step. If I remove "Encoding" under MQMD then I was not getting following error.

 

Header Details:

<Payload Version="2"><PayloadInfo type="com.ibm.mq.MQMessage"></PayloadInfo>
<IbmMqMessage>
<MQMD>
<Entry key="Expiry">600</Entry>
<Entry key="Encoding"><PayloadInfo type="java.lang.Integer"></PayloadInfo>
<Integer>
546</Integer>
</Entry>
<Entry key="CharacterSet">819</Entry>
<Entry key="Format">MQHRF2</Entry>
<Entry key="Priority">4</Entry>
<Entry key="Persistence">1</Entry>
<Entry key="MessageId">414D5120444934495230313720202020C31ACB591A810220</Entry>
<Entry key="CorrelationId">414D512053344B4750503031202020205996523915FFBA6D</Entry>
<Entry key="ReplyToQueueManager">VALUE</Entry>
<Entry key="UserId">VALUE</Entry>
<Entry key="AccountingToken">VALUE</Entry>
<Entry key="PutApplicationType">6</Entry>
<Entry key="PutApplicationName">VALUE</Entry>
<Entry key="PutDateTime">VALUE</Entry>
</MQMD>
<Payload>
<PayloadInfo type="[B"></PayloadInfo>
<RFH>
<RFH>
<Entry key="StructLength">212</Entry>
<Entry key="Encoding"><PayloadInfo type="java.lang.Integer"></PayloadInfo>
<Integer>
546</Integer>
</Entry>
<Entry key="CharacterSet">819</Entry>
<Entry key="Format">MQSTR</Entry>
<Entry key="NameValueCcsid">VALUE</Entry>
</RFH>
<LittleEndian>true</LittleEndian>
<ByteAlign>true</ByteAlign>
<Folders>
<Entry templateKey="mcd"><mcd>
<PayloadInfo type="java.lang.String"></PayloadInfo>
<mcd>
<Props>
<Entry key="Msd">jms_text</Entry>
</Props>
</mcd>
</mcd>
</Entry>
<Entry templateKey="jms"><jms>
<PayloadInfo type="java.lang.String"></PayloadInfo>
<jms>
<Props>
<Entry key="Dst">VALUE</Entry>
<Entry key="Tms">1506563444022</Entry>
<Entry key="Exp">1506563504022</Entry>
<Entry key="Dlv">2</Entry>
</Props>
</jms>
</jms>
</Entry>
</Folders>
<Payload>
<PayloadInfo type="java.lang.String"></PayloadInfo>
<XMLString>

 

============================================================================
| Completion Code 2 (MQCC_FAILED), Reason Code 2142 (MQRC_HEADER_ERROR)
============================================================================
| Step:        SendResponseToGPP
----------------------------------------------------------------------------
| Message:     Completion Code 2 (MQCC_FAILED), Reason Code 2142 (MQRC_HEADER_ERROR)
----------------------------------------------------------------------------
| Trapped Exception: Completion Code 2 (MQCC_FAILED), Reason Code 2142 (MQRC_HEADER_ERROR)
| Trapped Message:   

 

============================================================================
| Exception:
============================================================================
| Message:     Completion Code 2 (MQCC_FAILED), Reason Code 2142 (MQRC_HEADER_ERROR)
----------------------------------------------------------------------------
| Trapped Exception: MQJE001: Completion Code '2', Reason '2142'.
| Trapped Message:   com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2142'.
----------------------------------------------------------------------------
STACK TRACE
com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2142'.
    at com.ibm.mq.MQDestination.internalMQPUT(MQDestination.java:1339)
    at com.ibm.mq.MQDestination.put(MQDestination.java:1187)
    at com.itko.lisa.messaging.providers.ibmmq.IbmMqUtils.put(IbmMqUtils.java:238)
    at com.itko.lisa.messaging.providers.ibmmq.IbmMqPutOperation.doExecute(IbmMqPutOperation.java:841)
    at com.itko.lisa.messaging.providers.ibmmq.IbmMqPutOperation.doExecute(IbmMqPutOperation.java:58)
    at com.itko.lisa.asset.operation.AbstractRuntimeOperation.execute(AbstractRuntimeOperation.java:167)
    at com.itko.lisa.messaging.builder.AbstractSendReceiveOperation.doExecute(AbstractSendReceiveOperation.java:152)
    at com.itko.lisa.asset.operation.AbstractRuntimeOperation.execute(AbstractRuntimeOperation.java:167)
    at com.itko.lisa.asset.operation.AbstractOperationStep.execute(AbstractOperationStep.java:176)
    at com.itko.lisa.asset.operation.AbstractOperationStep.execute(AbstractOperationStep.java:125)
    at com.itko.lisa.test.TestNode.executeNode(TestNode.java:981)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1288)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1203)
    at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1188)
    at com.itko.lisa.editor.WalkThruPanel.prepAndExecNode(WalkThruPanel.java:1058)
    at com.itko.lisa.editor.WalkThruPanel.access$900(WalkThruPanel.java:71)
    at com.itko.lisa.editor.WalkThruPanel$10.doCallback(WalkThruPanel.java:965)
    at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194)
    at java.lang.Thread.run(Unknown Source)
============================================================================

 


----------------------------------------------------------------------------
STACK TRACE

 


============================================================================
| Exception:
============================================================================
| Message:     Completion Code 2 (MQCC_FAILED), Reason Code 2142 (MQRC_HEADER_ERROR)
----------------------------------------------------------------------------
| Trapped Exception: MQJE001: Completion Code '2', Reason '2142'.
| Trapped Message:   com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2142'.
----------------------------------------------------------------------------
STACK TRACE
com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2142'.
    at com.ibm.mq.MQDestination.internalMQPUT(MQDestination.java:1339)
    at com.ibm.mq.MQDestination.put(MQDestination.java:1187)
    at com.itko.lisa.messaging.providers.ibmmq.IbmMqUtils.put(IbmMqUtils.java:238)
    at com.itko.lisa.messaging.providers.ibmmq.IbmMqPutOperation.doExecute(IbmMqPutOperation.java:841)
    at com.itko.lisa.messaging.providers.ibmmq.IbmMqPutOperation.doExecute(IbmMqPutOperation.java:58)
    at com.itko.lisa.asset.operation.AbstractRuntimeOperation.execute(AbstractRuntimeOperation.java:167)
    at com.itko.lisa.messaging.builder.AbstractSendReceiveOperation.doExecute(AbstractSendReceiveOperation.java:152)
    at com.itko.lisa.asset.operation.AbstractRuntimeOperation.execute(AbstractRuntimeOperation.java:167)
    at com.itko.lisa.asset.operation.AbstractOperationStep.execute(AbstractOperationStep.java:176)
    at com.itko.lisa.asset.operation.AbstractOperationStep.execute(AbstractOperationStep.java:125)
    at com.itko.lisa.test.TestNode.executeNode(TestNode.java:981)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1288)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1203)
    at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1188)
    at com.itko.lisa.editor.WalkThruPanel.prepAndExecNode(WalkThruPanel.java:1058)
    at com.itko.lisa.editor.WalkThruPanel.access$900(WalkThruPanel.java:71)
    at com.itko.lisa.editor.WalkThruPanel$10.doCallback(WalkThruPanel.java:965)
    at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194)
    at java.lang.Thread.run(Unknown Source)
============================================================================

 


    at com.itko.lisa.messaging.providers.ibmmq.IbmMqUtils.toLisaException(IbmMqUtils.java:511)
    at com.itko.lisa.messaging.providers.ibmmq.IbmMqUtils.toLisaException(IbmMqUtils.java:482)
    at com.itko.lisa.messaging.providers.ibmmq.IbmMqUtils.put(IbmMqUtils.java:245)
    at com.itko.lisa.messaging.providers.ibmmq.IbmMqPutOperation.doExecute(IbmMqPutOperation.java:841)
    at com.itko.lisa.messaging.providers.ibmmq.IbmMqPutOperation.doExecute(IbmMqPutOperation.java:58)
    at com.itko.lisa.asset.operation.AbstractRuntimeOperation.execute(AbstractRuntimeOperation.java:167)
    at com.itko.lisa.messaging.builder.AbstractSendReceiveOperation.doExecute(AbstractSendReceiveOperation.java:152)
    at com.itko.lisa.asset.operation.AbstractRuntimeOperation.execute(AbstractRuntimeOperation.java:167)
    at com.itko.lisa.asset.operation.AbstractOperationStep.execute(AbstractOperationStep.java:176)
    at com.itko.lisa.asset.operation.AbstractOperationStep.execute(AbstractOperationStep.java:125)
    at com.itko.lisa.test.TestNode.executeNode(TestNode.java:981)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1288)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1203)
    at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1188)
    at com.itko.lisa.editor.WalkThruPanel.prepAndExecNode(WalkThruPanel.java:1058)
    at com.itko.lisa.editor.WalkThruPanel.access$900(WalkThruPanel.java:71)
    at com.itko.lisa.editor.WalkThruPanel$10.doCallback(WalkThruPanel.java:965)
    at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194)
    at java.lang.Thread.run(Unknown Source)
============================================================================

Outcomes