Meta Length of jPOS for ISO Message

388 views
Skip to first unread message

saqib.a...@gmail.com

unread,
Apr 12, 2019, 10:56:15 AM4/12/19
to jPOS Users
I made a server jPOS and make BCD Channel, iso ascii binary bitmap.xml is selected. when TCP dump request land on jPOS server it field isn't parsed. Please let me know meta length of message is how to be set? I use ISO 8583: 1987 message format

saqib.a...@gmail.com

unread,
Apr 15, 2019, 10:13:46 AM4/15/19
to jPOS Users
What meta Length does it work? please answer #TeamjPOS

chhil

unread,
Apr 15, 2019, 10:27:45 AM4/15/19
to jpos-...@googlegroups.com

This is where the BCDChannel calculates the length

SO if my message length in bytes was say 299

 System.out.println(ISOUtil.hexdump(ISOUtil.str2bcd(ISOUtil.zeropad(Integer.toString(299), 4), true)));

Outputs0000  02 99                                             ..

So you can see how the  2 length bytes length header gets sent.

-chhil




--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To post to this group, send email to jpos-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/28ba64f4-f19a-4ec3-90e1-c2ce0ebe3c9a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

saqib.a...@gmail.com

unread,
Apr 16, 2019, 1:56:08 AM4/16/19
to jPOS Users
Below mentioned logs attached when request land on jPOS. 

<log realm="channel/192.168.1.4:2019" at="Mon Apr 15 16:06:35 PKT 2019.745" lifespan="82184ms">
  <receive>
    <iso-exception>
      org.jpos.iso.IFA_LLCHAR: Problem unpacking field 34
      <nested-exception>
      java.lang.NegativeArraySizeException
at org.jpos.iso.AsciiInterpreter.uninterpret(AsciiInterpreter.java:53)
at org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.java:173)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:233)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:416)
at org.jpos.iso.BaseChannel.unpack(BaseChannel.java:901)
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:669)
at org.jpos.q2.iso.ChannelAdaptor$Receiver.run(ChannelAdaptor.java:295)
at java.lang.Thread.run(Unknown Source)
      </nested-exception>
      org.jpos.iso.ISOException: org.jpos.iso.IFA_LLCHAR: Problem unpacking field 34 (java.lang.NegativeArraySizeException)
at org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.java:178)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:233)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:416)
at org.jpos.iso.BaseChannel.unpack(BaseChannel.java:901)
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:669)
at org.jpos.q2.iso.ChannelAdaptor$Receiver.run(ChannelAdaptor.java:295)
at java.lang.Thread.run(Unknown Source)
Nested:java.lang.NegativeArraySizeException
at org.jpos.iso.AsciiInterpreter.uninterpret(AsciiInterpreter.java:53)
at org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.java:173)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:233)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:416)
at org.jpos.iso.BaseChannel.unpack(BaseChannel.java:901)
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:669)
at org.jpos.q2.iso.ChannelAdaptor$Receiver.run(ChannelAdaptor.java:295)
at java.lang.Thread.run(Unknown Source)
    </iso-exception>
    --- data ---
    0000  32 35 66 66 30 63 35 64  61 61 63 32 34 30 62 66  25ff0c5daac240bf
0010  66 38 63 66 63 61 65 35  39 37 64 61 32 31 32 37  f8cfcae597da2127
0020  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20                  
0030  20 20 20 20 30 2E 30 2E  30 2E 31 20 20 20 30 30      0.0.0.1   00
0040  30 30 32 30 30 B2 3C 44  01 28 EB 80 00 00 00 00  00200.<D.(......
0050  00 04 00 00 02 36 32 30  30 30 30 30 30 30 30 30  .....62000000000
0060  30 30 30 30 32 30 30 30  34 31 35 31 36 30 36 33  0000200041516063
0070  35 37 32 38 37 31 35 31  36 30 36 33 35 30 34 31  5728715160635041
0080  35 20 20 20 20 30 30 30  34 20 30 32 30 36 34 33  5    0004 020643
0090  33 33 33 36 30 30 37 32  38 37 31 35 31 30 35 31  3336007287151051
00a0  39 32 20 20 20 20 31 31  31 31 20 20 20 20 20 20  92    1111      
00b0  20 20 20 20 20 32 33 33  33 31 31 31 31 31 31 31       23331111111
00c0  31 31 31 31 31 31 31 31  31 31 31 31 31 31 31 31  1111111111111111
00d0  31 31 31 31 31 31 31 31  65 43 6F 6D 6D 65 72 63  11111111eCommerc
00e0  65 30 30 30 31 33 34 32  31 30 31 33 31 33 31 35  e000134210131315
00f0  30 38 39 30 30 31 32 35  38 36 32 32 31 31 31 31  0890012586221111
0100  31 31 31 31 31 31 31 31  31 31 31 31 31 31 31 31  1111111111111111
0110  31 31 30 30 36 33 7C 30  7C 31 7C                 110063|0|1|

  </receive>
</log>
<log realm="org.jpos.q2.iso.ChannelAdaptor" at="Mon Apr 15 16:06:35 PKT 2019.779">
  <warn>
    channel-receiver-Client-receive
    <iso-exception>
      org.jpos.iso.IFA_LLCHAR: Problem unpacking field 34
      <nested-exception>
      java.lang.NegativeArraySizeException
at org.jpos.iso.AsciiInterpreter.uninterpret(AsciiInterpreter.java:53)
at org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.java:173)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:233)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:416)
at org.jpos.iso.BaseChannel.unpack(BaseChannel.java:901)
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:669)
at org.jpos.q2.iso.ChannelAdaptor$Receiver.run(ChannelAdaptor.java:295)
at java.lang.Thread.run(Unknown Source)
      </nested-exception>
      org.jpos.iso.ISOException: org.jpos.iso.IFA_LLCHAR: Problem unpacking field 34 (java.lang.NegativeArraySizeException)
at org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.java:178)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:233)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:416)
at org.jpos.iso.BaseChannel.unpack(BaseChannel.java:901)
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:669)
at org.jpos.q2.iso.ChannelAdaptor$Receiver.run(ChannelAdaptor.java:295)
at java.lang.Thread.run(Unknown Source)
Nested:java.lang.NegativeArraySizeException
at org.jpos.iso.AsciiInterpreter.uninterpret(AsciiInterpreter.java:53)
at org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.java:173)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:233)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:416)
at org.jpos.iso.BaseChannel.unpack(BaseChannel.java:901)
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:669)
at org.jpos.q2.iso.ChannelAdaptor$Receiver.run(ChannelAdaptor.java:295)
at java.lang.Thread.run(Unknown Source)
    </iso-exception>
  </warn>
</log>

On Monday, 15 April 2019 19:27:45 UTC+5, chhil wrote:

This is where the BCDChannel calculates the length

SO if my message length in bytes was say 299

 System.out.println(ISOUtil.hexdump(ISOUtil.str2bcd(ISOUtil.zeropad(Integer.toString(299), 4), true)));

Outputs0000  02 99                                             ..

So you can see how the  2 length bytes length header gets sent.

-chhil




On Mon, Apr 15, 2019, 7:43 PM <saqib....@gmail.com> wrote:
What meta Length does it work? please answer #TeamjPOS

On Friday, 12 April 2019 19:56:15 UTC+5, saqib....@gmail.com wrote:
I made a server jPOS and make BCD Channel, iso ascii binary bitmap.xml is selected. when TCP dump request land on jPOS server it field isn't parsed. Please let me know meta length of message is how to be set? I use ISO 8583: 1987 message format

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-...@googlegroups.com.

chhil

unread,
Apr 16, 2019, 2:18:24 AM4/16/19
to jpos-...@googlegroups.com
> org.jpos.iso.IFA_LLCHAR: Problem unpacking field 34
Its telling there is a problem with field 34.
However, it could mean that there were problem in the field packagers before it and the previous ones probably have bad data in the fields but parsed correctly.
We have mentioned it time and again on this group, align your packagers correctly with your spec if you want the message to get parsed correctly.
The defaults provided at https://github.com/jpos/jPOS/tree/master/jpos/src/main/resources/packager are not universal, most entities have different flavor and you 
need to customize it to make it work for you.
Its an exercise you need to perform to fix the issue.

-chhil


To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.

To post to this group, send email to jpos-...@googlegroups.com.

saqib.a...@gmail.com

unread,
Apr 16, 2019, 2:35:37 AM4/16/19
to jPOS Users
I have set channel as BCD channel, and packager is iso87-binary-bitmap.xml selected. Now request isn't land on server. Server is connected but no data is received.


On Tuesday, 16 April 2019 11:18:24 UTC+5, chhil wrote:
> org.jpos.iso.IFA_LLCHAR: Problem unpacking field 34
Its telling there is a problem with field 34.
However, it could mean that there were problem in the field packagers before it and the previous ones probably have bad data in the fields but parsed correctly.
We have mentioned it time and again on this group, align your packagers correctly with your spec if you want the message to get parsed correctly.
The defaults provided at https://github.com/jpos/jPOS/tree/master/jpos/src/main/resources/packager are not universal, most entities have different flavor and you 
need to customize it to make it work for you.
Its an exercise you need to perform to fix the issue.

-chhil


chhil

unread,
Apr 16, 2019, 3:00:09 AM4/16/19
to jpos-...@googlegroups.com
Once again, you need to fix your packager xml based on your spec and not blindly use the one that is provided as a guidance.
You also need to make sure your channel chosen is correct. If what you have chosen and what the server expects are different, 
it will interpret the length differently and cause it to wait for more bytes or use a shorter length and read fewer bytes.

-chhil

To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.

To post to this group, send email to jpos-...@googlegroups.com.

saqib.a...@gmail.com

unread,
Apr 16, 2019, 9:55:02 AM4/16/19
to jPOS Users
How to change 'maxPacketLength' which file does it configure please let me know.
Thanks 

<log realm="org.jpos.q2.iso.ChannelAdaptor" at="Tue Apr 16 18:51:19 PKT 2019.460">
  <warn>
    channel-receiver-sampleclient1-receive
    <iso-exception>
      receive length 808597303 seems strange - maxPacketLength = 100000
      org.jpos.iso.ISOException: receive length 808597303 seems strange - maxPacketLength = 100000
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:663)
at org.jpos.q2.iso.ChannelAdaptor$Receiver.run(ChannelAdaptor.java:295)
at java.lang.Thread.run(Unknown Source)
    </iso-exception>
  </warn>
</log>

On Tuesday, 16 April 2019 12:00:09 UTC+5, chhil wrote:
Once again, you need to fix your packager xml based on your spec and not blindly use the one that is provided as a guidance.
You also need to make sure your channel chosen is correct. If what you have chosen and what the server expects are different, 
it will interpret the length differently and cause it to wait for more bytes or use a shorter length and read fewer bytes.

-chhil

chhil

unread,
Apr 16, 2019, 10:46:23 AM4/16/19
to jpos-...@googlegroups.com
You don't want to fix the maxpacket length, you want to use the right channel so that the sent length and received length is understood correctly.

I think you should stop here and first go through the jpos programmers guide and understand how its components get configured and work, things don't magically 
start working a lot of effort needs to go into setting things up correctly.


-chhil

To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.

To post to this group, send email to jpos-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages