dinesh kumar
dinesh kumar

Reputation: 11

Observing Error while unpacking response data in Jmeter using ISO8583 plugin

I am able to send request successfully to server and able to get response back as well. When Unpacking fields from response data observing error in field #48, but when i decode the bitmap field #48 is not present.

BITMAP from Response data: 722022810AD08202

Attaching Jmeter Log for your reference:

2024-10-25 09:02:07,934 ERROR n.c.b.j.i.Q2: (channel/XX.XXX.XX.XX:XXXXX) [receive] --- data ---
2024-10-25 09:02:07,934 ERROR n.c.b.j.i.Q2: (channel/XX.XXX.XX.XX:XXXXX) [receive] 
0000  01 10 72 20 22 81 0A D0  82 02 10 XX XX XX XX XX 
0010  XX XX XX 00 00 00 00 00  00 00 12 00 08 21 06 57 
0020  20 18 45 66 08 26 00 00  00 06 44 10 03 F4 F2 F2 
0030  F1 F0 F6 F1 F8 F3 F9 F8  F8 F1 F9 E3 C5 D9 D4 C9 
0040  C4 F0 F1 E2 88 85 93 84  96 95 40 E2 98 A4 81 99 
0050  85 40 02 F5 E8 08 26 49  01 00 46 9A 03 08 11 05 
0060  9C 01 00 9F 02 06 00 00  00 00 12 00 9F 03 06 00 
0070  00 00 00 00 00 9F 10 07  06 09 0A 03 A4 00 00 9F 
0080  1A 02 08 26 9F 26 08 01  23 45 67 89 AB CD EF 9F 
0090  33 03 E0 E0 E0 9F 36 02  00 FF 9F 37 04 9B AD BC 
00a0  AB 05 80 00 00 00 02                              
2024-10-25 09:02:07,934 ERROR n.c.b.j.i.Q2: (org.jpos.q2.iso.ChannelAdaptor) channel-receiver-jmeter-bdc26f30-receive
2024-10-25 09:02:07,934 ERROR n.c.b.j.i.Q2: (org.jpos.q2.iso.ChannelAdaptor) org.jpos.iso.IFB_LLLCHAR: Problem unpacking field 48 (java.lang.RuntimeException: Required 100 but just got 77 bytes) unpacking field=48, consumed=88
org.jpos.iso.ISOException: org.jpos.iso.IFB_LLLCHAR: Problem unpacking field 48 (java.lang.RuntimeException: Required 100 but just got 77 bytes) unpacking field=48, consumed=88
    at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:341) ~[jpos-2.1.8.jar:2.1.8]
    at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:479) ~[jpos-2.1.8.jar:2.1.8]
    at org.jpos.iso.BaseChannel.unpack(BaseChannel.java:978) ~[jpos-2.1.8.jar:2.1.8]
    at org.jpos.iso.BaseChannel.receive(BaseChannel.java:748) ~[jpos-2.1.8.jar:2.1.8]
    at org.jpos.q2.iso.ChannelAdaptor$Receiver.run(ChannelAdaptor.java:333) [jpos-2.1.8.jar:2.1.8]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]

Attaching XML Packer as well:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE isopackager PUBLIC
        "-//jPOS/jPOS Generic Packager DTD 1.0//EN"
        "http://jpos.org/dtd/generic-packager-1.0.dtd">

<!-- ISO 8583:1993 (BINARY) field descriptions for GenericPackager -->

<isopackager headerLength="22">
    <isofield
      id="0"
      length="4"
      name="Message Type Indicator"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="1"
      length="16"
      name="Bitmap"
      class="org.jpos.iso.IFB_BITMAP"/>
  <isofield
      id="2"
      length="16"
      name="Primary Account number"
      pad="false"
      class="org.jpos.iso.IFB_LLHNUM"/>
  <isofield
      id="3"
      length="6"
      name="Processing Code"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="4"
      length="12"
      name="Amount, Transaction"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="5"
      length="12"
      name="Amount, Reconciliation"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="6"
      length="12"
      name="Amount, Cardholder billing"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="7"
      length="10"
      name="Date and time, transmission"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="8"
      length="8"
      name="Amount, Cardholder billing fee"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="9"
      length="8"
      name="Conversion rate, Reconciliation"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="10"
      length="8"
      name="Conversion rate, Cardholder billing"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="11"
      length="6"
      name="Systems trace audit number"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="12"
      length="12"
      name="Date and time, Local transaction"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="13"
      length="4"
      name="Date, Effective"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="14"
      length="4"
      name="Date, Expiration"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="15"
      length="6"
      name="Date, Settlement"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="16"
      length="4"
      name="Date, Conversion"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="17"
      length="4"
      name="Date, Capture"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="18"
      length="4"
      name="Merchant type"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="19"
      length="4"
      name="Country code, Acquiring institution"
      pad="true"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="20"
      length="3"
      name="Country code, Primary account number"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="21"
      length="3"
      name="Country code, Forwarding institution"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="22"
      length="4"
      name="Point of service data code"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="23"
      length="3"
      name="Card sequence number"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="24"
      length="3"
      name="Function code"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="25"
      length="2"
      name="Message reason code"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="26"
      length="4"
      name="Card acceptor business code"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="27"
      length="1"
      name="Approval code length"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="28"
      length="9"
      name="Date, Reconciliation"
      pad="false"
      class="org.jpos.iso.IFE_CHAR"/>
  <isofield
      id="29"
      length="3"
      name="Reconciliation indicator"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="30"
      length="24"
      name="Amounts, original"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="31"
      length="99"
      name="Acquirer reference data"
      class="org.jpos.iso.IFB_LLCHAR"/>
  <isofield
      id="32"
      length="11"
      name="Acquirer institution ident code"
      pad="false"
      class="org.jpos.iso.IFB_LLNUM"/>
  <isofield
      id="33"
      length="11"
      name="Forwarding institution ident code"
      pad="false"
      class="org.jpos.iso.IFB_LLNUM"/>
  <isofield
      id="34"
      length="28"
      name="Primary account number, extended"
      class="org.jpos.iso.IFB_LLCHAR"/>
  <isofield
      id="35"
      length="38"
      name="Track 2 data"
      pad="true"
      class="org.jpos.iso.IFB_LLHNUM"/>
  <isofield
      id="36"
      length="104"
      name="Track 3 data"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="37"
      length="12"
      name="Retrieval reference number"
      class="org.jpos.iso.IFE_CHAR"/>
  <isofield
      id="38"
      length="6"
      name="Approval code"
      class="org.jpos.iso.IF_CHAR"/>
  <isofield
      id="39"
      length="2"
      name="Action code"
      pad="false"
      class="org.jpos.iso.IFE_CHAR"/>
  <isofield
      id="40"
      length="3"
      name="Service code"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="41"
      length="8"
      name="Card acceptor terminal identification"
      class="org.jpos.iso.IFE_CHAR"/>
  <isofield
      id="42"
      length="15"
      name="Card acceptor identification code"
      class="org.jpos.iso.IFE_CHAR"/>
  <isofield
      id="43"
      length="40"
      name="Card acceptor name/location"
      class="org.jpos.iso.IFE_CHAR"/>
<isofieldpackager id="44"
                      name="Additional data"
                      length="3"
                      class="org.jpos.iso.IF_CHAR"
                      packager="org.jpos.iso.packager.GenericSubFieldPackager"
                      emitBitmap="false"
                      maxValidField="2">
    <isofield id="1"
              name="Length"
              length="1"
              pad="true"
              class="org.jpos.iso.IFB_BINARY"/>
    <isofield id="2"
              name="Value"
              length="2"
              pad="false"
              class="org.jpos.iso.IFE_CHAR"/>
  </isofieldpackager>
  <isofield
      id="45"
      length="76"
      name="Track 1 data"
      class="org.jpos.iso.IFB_LLCHAR"/>
  <isofield
      id="46"
      length="204"
      name="Amounts, Fees"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="47"
      length="999"
      name="Additional data - national"
      class="org.jpos.iso.IFB_LLLBINARY"/>
  <isofield
      id="48"
      length="999"
      name="Additional data - private"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="49"
      length="4"
      name="Currency code, Transaction"
      pad="true"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="50"
      length="3"
      name="Currency code, Reconciliation"
      class="org.jpos.iso.IF_CHAR"/>
  <isofield
      id="51"
      length="3"
      name="Currency code, Cardholder billing"
      class="org.jpos.iso.IF_CHAR"/>
  <isofield
      id="52"
      length="8"
      name="Personal identification number [PIN] data"
      class="org.jpos.iso.IFB_BINARY"/>
  <isofield
      id="53"
      length="48"
      name="Security related control information"
      class="org.jpos.iso.IFB_LLBINARY"/>
  <isofield
      id="54"
      length="120"
      name="Amounts, additional"
      class="org.jpos.iso.IFB_LLLCHAR"/>
<isofieldpackager id="55"
                      name="ICC"
                      length="99"
                      class="org.jpos.iso.IF_CHAR"
                      packager="org.jpos.iso.packager.GenericSubFieldPackager"
                      emitBitmap="false"
                      maxValidField="20">
    <isofield id="1"
              name="Fieldlength"
              length="2"
              pad="false"
              class="org.jpos.iso.IFB_NUMERIC"/>
    <isofield id="2"
              name="TAGS"
              length="98"
              pad="false"
              class="org.jpos.iso.IFB_BINARY"/>
    </isofieldpackager>
  <isofield
      id="56"
      length="35"
      name="Original data elements"
      pad="false"
      class="org.jpos.iso.IFB_LLNUM"/>
  <isofield
      id="57"
      length="3"
      name="Authorization life cycle code"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="58"
      length="11"
      name="Authorizing agent institution Id Code"
      pad="false"
      class="org.jpos.iso.IFB_LLNUM"/>
  <isofield
      id="59"
      length="999"
      name="Transport data"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="60"
      length="4"
      name="Reserved for national use"
      class="org.jpos.iso.IFB_LLBINARY"/>
  <isofield
      id="61"
      length="999"
      name="Reserved for national use"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="62"
      length="8"
      name="Reserved for private use"
      class="org.jpos.iso.IFB_LLBINARY"/>
  <isofield
      id="63"
      length="5"
      name="Reserved for private use"
      class="org.jpos.iso.IFB_LLBINARY"/>
  <isofield
      id="64"
      length="8"
      name="Message authentication code field"
      class="org.jpos.iso.IFB_BINARY"/>
  <isofield
      id="65"
      length="8"
      name="Reserved for ISO use"
      class="org.jpos.iso.IFB_BINARY"/>
  <isofield
      id="66"
      length="204"
      name="Amounts, original fees"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="67"
      length="2"
      name="Extended payment data"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="68"
      length="3"
      name="Country code, receiving institution"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="69"
      length="3"
      name="Country code, settlement institution"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="70"
      length="3"
      name="Country code, authorizing agent Inst."
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="71"
      length="8"
      name="Message number"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="72"
      length="999"
      name="Data record"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="73"
      length="6"
      name="Date, action"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="74"
      length="10"
      name="Credits, number"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="75"
      length="10"
      name="Credits, reversal number"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="76"
      length="10"
      name="Debits, number"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="77"
      length="10"
      name="Debits, reversal number"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="78"
      length="10"
      name="Transfer, number"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="79"
      length="10"
      name="Transfer, reversal number"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="80"
      length="10"
      name="Inquiries, number"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="81"
      length="10"
      name="Authorizations, number"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="82"
      length="10"
      name="Inquiries, reversal number"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="83"
      length="10"
      name="Payments, number"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="84"
      length="10"
      name="Payments, reversal number"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="85"
      length="10"
      name="Fee collections, number"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="86"
      length="16"
      name="Credits, amount"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="87"
      length="16"
      name="Credits, reversal amount"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="88"
      length="16"
      name="Debits, amount"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="89"
      length="16"
      name="Debits, reversal amount"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="90"
      length="10"
      name="Authorizations, reversal number"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="91"
      length="3"
      name="Country code, transaction Dest. Inst."
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="92"
      length="3"
      name="Country code, transaction Orig. Inst."
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="93"
      length="11"
      name="Transaction Dest. Inst. Id code"
      pad="false"
      class="org.jpos.iso.IFB_LLNUM"/>
  <isofield
      id="94"
      length="11"
      name="Transaction Orig. Inst. Id code"
      pad="false"
      class="org.jpos.iso.IFB_LLNUM"/>
  <isofield
      id="95"
      length="99"
      name="Card issuer reference data"
      class="org.jpos.iso.IFB_LLCHAR"/>
  <isofield
      id="96"
      length="999"
      name="Key management data"
      class="org.jpos.iso.IFB_LLLBINARY"/>
  <isofield
      id="97"
      length="17"
      name="Amount, Net reconciliation"
      pad="false"
      class="org.jpos.iso.IFB_AMOUNT"/>
  <isofield
      id="98"
      length="25"
      name="Payee"
      class="org.jpos.iso.IF_CHAR"/>
  <isofield
      id="99"
      length="11"
      name="Settlement institution Id code"
      class="org.jpos.iso.IFB_LLCHAR"/>
  <isofield
      id="100"
      length="11"
      name="Receiving institution Id code"
      pad="false"
      class="org.jpos.iso.IFB_LLNUM"/>
  <isofield
      id="101"
      length="17"
      name="File name"
      class="org.jpos.iso.IFB_LLCHAR"/>
  <isofield
      id="102"
      length="28"
      name="Account identification 1"
      class="org.jpos.iso.IFB_LLCHAR"/>
  <isofield
      id="103"
      length="28"
      name="Account identification 2"
      class="org.jpos.iso.IFB_LLCHAR"/>
  <isofield
      id="104"
      length="100"
      name="Transaction description"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="105"
      length="16"
      name="Credits, Chargeback amount"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="106"
      length="16"
      name="Debits, Chargeback amount"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="107"
      length="10"
      name="Credits, Chargeback number"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="108"
      length="10"
      name="Debits, Chargeback number"
      pad="false"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="109"
      length="84"
      name="Credits, Fee amounts"
      class="org.jpos.iso.IFB_LLCHAR"/>
  <isofield
      id="110"
      length="84"
      name="Debits, Fee amounts"
      class="org.jpos.iso.IFB_LLCHAR"/>
  <isofield
      id="111"
      length="999"
      name="Reserved for ISO use"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="112"
      length="999"
      name="Reserved for ISO use"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="113"
      length="999"
      name="Reserved for ISO use"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="114"
      length="999"
      name="Reserved for ISO use"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="115"
      length="999"
      name="Reserved for ISO use"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="116"
      length="999"
      name="Reserved for national use"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="117"
      length="999"
      name="Reserved for national use"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="118"
      length="999"
      name="Reserved for national use"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="119"
      length="999"
      name="Reserved for national use"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="120"
      length="999"
      name="Reserved for national use"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="121"
      length="999"
      name="Reserved for national use"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="122"
      length="999"
      name="Reserved for national use"
      class="org.jpos.iso.IFB_LLLCHAR"/>
<isofieldpackager id="123"
                      name="Additional data"
                      length="26"
                      class="org.jpos.iso.IFB_BINARY"
                      packager="org.jpos.iso.packager.GenericSubFieldPackager"
                      emitBitmap="false"
                      maxValidField="2">
    <isofield id="1"
              name="Length"
              length="1"
              pad="true"
              class="org.jpos.iso.IFB_BINARY"/>
    <isofield id="2"
              name="Value"
              length="25"
              pad="false"
              class="org.jpos.iso.IFE_CHAR"/>
  </isofieldpackager>
  <isofield
      id="124"
      length="999"
      name="Reserved for private use"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="125"
      length="999"
      name="Reserved for private use"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="126"
      length="999"
      name="Reserved for private use"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="127"
      length="999"
      name="Reserved for private use"
      class="org.jpos.iso.IFB_LLLCHAR"/>
  <isofield
      id="128"
      length="8"
      name="Message authentication code field"
      class="org.jpos.iso.IFB_BINARY"/>
</isopackager>

Is there any work around for this reported issue.

Upvotes: 1

Views: 81

Answers (1)

Andr&#233;s Alcarraz
Andr&#233;s Alcarraz

Reputation: 1865

This answer assumes that the question is a follow-up from How to send Header value in Jmeter using ISO8583 Plugin

You probably have a misalignment due to the header.

The best first thing you want to do is to add a logger to the packager, I don’t know how you can see them in jMeter, but you could use jPOS-EE client simulator to get the configuration right; and then move to using jMeter, or perhaps stick with the client simulator, this post is old, but I bet it will work for you.

I would also suggest you to handle the header at the channel level and not in the packager. Remove the headerLength attribute from the packager, and then put 0000000000000000000000 as the channel’s header, this will tell the channel what length to expect for the header of the incoming messages.

You would also need to remove the override-header property of the channel, so that the channel uses the message’s header, instead of overriding it.

Upvotes: 0

Related Questions