错误打包字段 61 (org.jpos.iso.ISOException: java.lang.NullPointerException (java.lang.NullPointerException))

error packing field 61 (org.jpos.iso.ISOException: java.lang.NullPointerException (java.lang.NullPointerException))

我正在使用万事达卡接口规范来打包字段 61,如下所示:

<isofieldpackager
    id="61"
    length="40"
    name="Point-of-Service (POS) Data"
    class="org.jpos.iso.IFB_LLBINARY"
    emitBitmap="false"
    packager="org.jpos.iso.packager.GenericSubFieldPackager">
    <isofield
        id="1"
        length="1"
        name="POS Terminal Attendance"
        class="org.jpos.iso.IF_CHAR"/>
    <isofield
        id="3"
        length="1"
        name="POS Terminal Location"
        class="org.jpos.iso.IF_CHAR"/>
    <isofield
        id="4"
        length="1"
        name="POS Cardholder Presence"
        class="org.jpos.iso.IF_CHAR"/>
    <isofield
        id="5"
        length="1"
        name="POS Card Presence"
        class="org.jpos.iso.IF_CHAR"/>
    <isofield
        id="6"
        length="1"
        name="POS Card Capture Capabilities"
        class="org.jpos.iso.IF_CHAR"/>
    <isofield
        id="7"
        length="1"
        name="POS Transaction Status"
        class="org.jpos.iso.IF_CHAR"/>
    <isofield
        id="8"
        length="1"
        name="POS Transaction Security"
        class="org.jpos.iso.IF_CHAR"/>
    <isofield
        id="10"
        length="1"
        name="Cardholder-Activated Terminal Level"
        class="org.jpos.iso.IF_CHAR"/>
    <isofield
        id="11"
        length="1"
        name="POS Card Data Terminal Input Capability Indicator"
        class="org.jpos.iso.IF_CHAR"/>
    <isofield
        id="12"
        length="2"
        name="POS Card Data Terminal Input Capability Indicator"
        class="org.jpos.iso.IF_CHAR"/>
    <isofield
        id="13"
        length="3"
        name="POS Country Code"
        class="org.jpos.iso.IF_CHAR"/>
</isofieldpackager>

然后我这样调用打包器:

ISOMsg message = new ISOMsg();
message.set("61.1", "1");       //Unattended terminal
    message.set("61.3", "2");       //Off premises of card acceptor facility
    message.set("61.4", "5");       //Electronic order (home PC, Internet, mobile phone, PDA)
    message.set("61.5", "1");       //Card not present
    message.set("61.6", "0");       //Terminal/operator has no card capture capability
    message.set("61.7", "0");       //Normal request (original presentment)
    message.set("61.8", "0");       //No security concern
    message.set("61.10", "6");      //Authorized Level 6 CAT: Electronic commerce
    message.set("61.11", "6");      //Key entry only
    message.set("61.12", "00");
    message.set("61.13", "716");    //country code Zimbabwe

但是我得到了一个看起来像这样的异常:

    <log realm="channel/127.0.0.1:1234" at="2018-02-20T13:02:14.775" lifespan="31ms">
  <connect>
Exception in thread "main" org.jpos.iso.ISOException: error packing field 61 (org.jpos.iso.ISOException: java.lang.NullPointerException (java.lang.NullPointerException))
    at org.jpos.iso.ISOBasePackager.pack(ISOBasePackager.java:184)
    at org.jpos.iso.ISOMsg.pack(ISOMsg.java:456)
    at com.jpos.test.Test.main(Test.java:51)
Nested:org.jpos.iso.ISOException: java.lang.NullPointerException (java.lang.NullPointerException)
    at org.jpos.iso.packager.GenericSubFieldPackager.pack(GenericSubFieldPackager.java:167)
    at org.jpos.iso.ISOMsgFieldPackager.pack(ISOMsgFieldPackager.java:60)
    at org.jpos.iso.ISOBasePackager.pack(ISOBasePackager.java:175)
    at org.jpos.iso.ISOMsg.pack(ISOMsg.java:456)
    at com.jpos.test.Test.main(Test.java:51)
Nested:java.lang.NullPointerException
    at org.jpos.iso.packager.GenericSubFieldPackager.pack(GenericSubFieldPackager.java:136)
    at org.jpos.iso.ISOMsgFieldPackager.pack(ISOMsgFieldPackager.java:60)
    at org.jpos.iso.ISOBasePackager.pack(ISOBasePackager.java:175)
    at org.jpos.iso.ISOMsg.pack(ISOMsg.java:456)
    at com.jpos.test.Test.main(Test.java:51)
/home/terrence/.cache/netbeans/8.2/executor-snippets/run.xml:53: Java returned: 1
BUILD FAILED (total time: 1 second)

你能帮我理解为什么我会收到这个错误吗,我试过更改包装器上的数据 类,并更改通用子字段包装器以使用 europay 子字段包装器和相应的数据 类 但我仍然得到相同的例外

这是一个 bitmap-less 字段。问题可能是缺少字段 2 的定义。此外,请注意该字段(我相信)是 IFB_LLLBINARY 而不是 IFB_LLBINARY