Re: [jpos-users] Having an Issue with JPOS channel.

357 views
Skip to first unread message
Message has been deleted

chhil

unread,
Aug 15, 2016, 5:41:58 AM8/15/16
to jpos-...@googlegroups.com
What packager is being used on the server?
Your packager and the servers packagers are not aligned (definition of field x om your ISO8583 does not match definition of fied x on the server) causing the parsing to fail on the server.

What should I do?
Align the packagers.

How do I align them?
Get the packager from the server and go field by field and manually align them in your custom packager.

Can you help align them?
Your custom packager is something you will need to debug and fix on your own, its not jpos related. You may want to define the bitmap and field priors to 4 that you have not done in your custom packager. When you use any code, do try to understand it before using it.

You can use the jpos packager which you know work but can't use to pack the message, get the bytes/hexdump and compare it wit you are sending and understand why the server does not like your custom packaged message.

-chhil


On Mon, Aug 15, 2016 at 2:27 PM, Israel Meshileya <odunmes...@gmail.com> wrote:
I have two different files (JAVA classes), which i want to use in connecting to my JPOS channel. The problem here is that, I can pack and unpack my data, but sending it to the JPOS channel, and receiving it back is always giving me a challenge.

In this isoo8583.java class, I am always getting 

<log realm="server.session/127.0.0.1" at="Mon Aug 15 09:52:18 WAT 2016.16">
  <session-start/>
</log>
Length = 3038
<log realm="pos-server/127.0.0.1:14004" at="Mon Aug 15 09:52:18 WAT 2016.28" lifespan="5ms">
  <receive>
    <peer-disconnect>Connection reset</peer-disconnect>
  </receive>
</log>
<log realm="server.session/127.0.0.1" at="Mon Aug 15 09:52:18 WAT 2016.41">
  <session-end/>
</log>

but, trying out testingiso.java, i always get 

<log realm="server.session/192.168.3.230" at="Mon Aug 15 09:25:02 WAT 2016.670">
  <session-start/>
</log>
Length = 0030
Byte length(b): 48 :: Incoming data HEX(d): 3830300238000000C282000030383133313531353437303030323138313531353437303831335445524D494430313434
<log realm="pos-server/192.168.3.230:13727" at="Mon Aug 15 09:25:02 WAT 2016.724" lifespan="51ms">
  <receive>
    <iso-exception>
      org.jpos.iso.IFA_LLNUM: Problem unpacking field 33 (java.lang.ArrayIndexOutOfBoundsException: 48) unpacking field=33, consumed=42
      org.jpos.iso.ISOException: org.jpos.iso.IFA_LLNUM: Problem unpacking field 33 (java.lang.ArrayIndexOutOfBoundsException: 48) unpacking field=33, consumed=42
        at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:273)
        at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:416)
        at org.jpos.iso.BaseChannel.unpack(BaseChannel.java:903)
        at org.jpos.iso.BaseChannel.receive(BaseChannel.java:671)
        at org.jpos.iso.ISOServer$Session.run(ISOServer.java:130)
        at org.jpos.util.ThreadPool$PooledThread.run(ThreadPool.java:71)
    </iso-exception>
    --- data ---
    0000  38 30 30 02 38 00 00 00  C2 82 00 00 30 38 31 33  800.8.......0813
0010  31 35 31 35 34 37 30 30  30 32 31 38 31 35 31 35  1515470002181515
0020  34 37 30 38 31 33 54 45  52 4D 49 44 30 31 34 34  470813TERMID0144

  </receive>
</log>
<log realm="server.session/192.168.3.230" at="Mon Aug 15 09:25:02 WAT 2016.760">
  <session-error>
    <iso-exception>
      org.jpos.iso.IFA_LLNUM: Problem unpacking field 33 (java.lang.ArrayIndexOutOfBoundsException: 48) unpacking field=33, consumed=42
      org.jpos.iso.ISOException: org.jpos.iso.IFA_LLNUM: Problem unpacking field 33 (java.lang.ArrayIndexOutOfBoundsException: 48) unpacking field=33, consumed=42
        at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:273)
        at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:416)
        at org.jpos.iso.BaseChannel.unpack(BaseChannel.java:903)
        at org.jpos.iso.BaseChannel.receive(BaseChannel.java:671)
        at org.jpos.iso.ISOServer$Session.run(ISOServer.java:130)
        at org.jpos.util.ThreadPool$PooledThread.run(ThreadPool.java:71)
    </iso-exception>
  </session-error>
</log>
<log realm="server.session/192.168.3.230" at="Mon Aug 15 09:25:02 WAT 2016.814">
  <session-end/>

--
--
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
 
Join us in IRC at http://webchat.freenode.net/?channels=jpos
 
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/6881f6c1-0680-404a-8372-7c8f8c0a8759%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted
Message has been deleted

Israel Meshileya

unread,
Aug 15, 2016, 6:53:38 AM8/15/16
to jPOS Users
thanks so much for this illustration...I will definitely do my Homework...and give you the necessary feedback...but, if i should use the JPOS packager, to package my data, i always get same result with this customized packager of mine...
To unsubscribe, send email to jpos-users+...@googlegroups.com

For more options, visit this group at http://groups.google.com/group/jpos-users
---
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.

chhil

unread,
Aug 15, 2016, 6:58:11 AM8/15/16
to jpos-...@googlegroups.com
Get the packager from the server and use that. 

-chhil

To unsubscribe, send email to jpos-users+unsubscribe@googlegroups.com

For more options, visit this group at http://groups.google.com/group/jpos-users
---
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/8f915a34-ba15-4220-b114-2fbfec35965a%40googlegroups.com.

Israel Meshileya

unread,
Aug 16, 2016, 10:14:21 AM8/16/16
to jPOS Users
already done my HOMEWORK..on using the packager from the server, now i am actually facing this little challenge


<log realm="server.session/192.168.3.230" at="Tue Aug 16 15:04:44 WAT 2016.123">
  <session-start/>
</log>
Length = 0430
Byte length(b): 1072 :: Incoming data HEX(d): 3830300238000000C282000030303030303030303130303732323137313934363030303030363030303231383030303631373139343630303034303732323030303030303038323730303233363830303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030
<log realm="pos-server/192.168.3.230:24620" at="Tue Aug 16 15:04:44 WAT 2016.134" lifespan="10ms">
  <receive>
    <isomsg direction="incoming">
      <!-- org.jpos.iso.packager.GenericPackager[config/hbngpostilion.xml] -->
      <field id="0" value="800&#2;"/>
      <field id="3" value="000000"/>
      <field id="4" value="001007221719"/>
      <field id="5" value="460000060002"/>
      <field id="33" value="000617194600040722"/>
      <field id="34" value=""/>
      <field id="39" value="00"/>
      <field id="41" value="00082700"/>
      <field id="47" value="80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"/>
    </isomsg>
  </receive>
</log>
I am here
Get INet: 192.168.3.230
<log realm="pos-server/192.168.3.230:24620" at="Tue Aug 16 15:04:44 WAT 2016.178" lifespan="1ms">
  <send>
    <isomsg direction="outgoing">
      <!-- org.jpos.iso.packager.GenericPackager[config/hbngpostilion.xml] -->
      <field id="0" value="8010"/>
      <field id="3" value="000000"/>
      <field id="4" value="001007221719"/>
      <field id="5" value="460000060002"/>
      <field id="33" value="000617194600040722"/>
      <field id="34" value=""/>
      <field id="39" value="01"/>
      <field id="41" value="00082700"/>
      <field id="47" value="80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"/>
    </isomsg>
    <iso-exception>
      org.jpos.iso.IFA_LLNUM: Problem packing field 33
      <iso-exception>
        Field length 18 too long. Max: 11
        org.jpos.iso.ISOException: Field length 18 too long. Max: 11
        at org.jpos.iso.ISOStringFieldPackager.pack(ISOStringFieldPackager.java:140)
        at org.jpos.iso.ISOBasePackager.pack(ISOBasePackager.java:120)
        at org.jpos.iso.ISOMsg.pack(ISOMsg.java:405)
        at org.jpos.iso.BaseChannel.send(BaseChannel.java:528)
        at com.access.jpos.Server.process(Server.java:178)
        at org.jpos.iso.ISOServer$Session.run(ISOServer.java:134)
        at org.jpos.util.ThreadPool$PooledThread.run(ThreadPool.java:71)
      </iso-exception>
      org.jpos.iso.ISOException: org.jpos.iso.IFA_LLNUM: Problem packing field 33 (org.jpos.iso.ISOException: Field length 18 too long. Max: 11)
        at org.jpos.iso.ISOStringFieldPackager.pack(ISOStringFieldPackager.java:150)
        at org.jpos.iso.ISOBasePackager.pack(ISOBasePackager.java:120)
        at org.jpos.iso.ISOMsg.pack(ISOMsg.java:405)
        at org.jpos.iso.BaseChannel.send(BaseChannel.java:528)
        at com.access.jpos.Server.process(Server.java:178)
        at org.jpos.iso.ISOServer$Session.run(ISOServer.java:134)
        at org.jpos.util.ThreadPool$PooledThread.run(ThreadPool.java:71)
Nested:org.jpos.iso.ISOException: Field length 18 too long. Max: 11
        at org.jpos.iso.ISOStringFieldPackager.pack(ISOStringFieldPackager.java:140)
        at org.jpos.iso.ISOBasePackager.pack(ISOBasePackager.java:120)
        at org.jpos.iso.ISOMsg.pack(ISOMsg.java:405)
        at org.jpos.iso.BaseChannel.send(BaseChannel.java:528)
        at com.access.jpos.Server.process(Server.java:178)
        at org.jpos.iso.ISOServer$Session.run(ISOServer.java:134)
        at org.jpos.util.ThreadPool$PooledThread.run(ThreadPool.java:71)
    </iso-exception>
  </send>
</log>
org.jpos.iso.ISOException: org.jpos.iso.IFA_LLNUM: Problem packing field 33 (org.jpos.iso.ISOException: Field length 18 too long. Max: 11)
        at org.jpos.iso.ISOStringFieldPackager.pack(ISOStringFieldPackager.java:150)
        at org.jpos.iso.ISOBasePackager.pack(ISOBasePackager.java:120)
        at org.jpos.iso.ISOMsg.pack(ISOMsg.java:405)
        at org.jpos.iso.BaseChannel.send(BaseChannel.java:528)
        at com.access.jpos.Server.process(Server.java:178)
        at org.jpos.iso.ISOServer$Session.run(ISOServer.java:134)
        at org.jpos.util.ThreadPool$PooledThread.run(ThreadPool.java:71)
Nested:org.jpos.iso.ISOException: Field length 18 too long. Max: 11
        at org.jpos.iso.ISOStringFieldPackager.pack(ISOStringFieldPackager.java:140)
        at org.jpos.iso.ISOBasePackager.pack(ISOBasePackager.java:120)
        at org.jpos.iso.ISOMsg.pack(ISOMsg.java:405)
        at org.jpos.iso.BaseChannel.send(BaseChannel.java:528)
        at com.access.jpos.Server.process(Server.java:178)
        at org.jpos.iso.ISOServer$Session.run(ISOServer.java:134)
        at org.jpos.util.ThreadPool$PooledThread.run(ThreadPool.java:71)
Nested:org.jpos.iso.ISOException: Field length 18 too long. Max: 11
        at org.jpos.iso.ISOStringFieldPackager.pack(ISOStringFieldPackager.java:140)
        at org.jpos.iso.ISOBasePackager.pack(ISOBasePackager.java:120)
        at org.jpos.iso.ISOMsg.pack(ISOMsg.java:405)
        at org.jpos.iso.BaseChannel.send(BaseChannel.java:528)
        at com.access.jpos.Server.process(Server.java:178)
        at org.jpos.iso.ISOServer$Session.run(ISOServer.java:134)
        at org.jpos.util.ThreadPool$PooledThread.run(ThreadPool.java:71)
Length = 3030

..the MTI is not showing the correct value, and all the fields are not giving me the correct values been assigned to them.
just like @chill said It's a misalignment of your packager field definitions. Go field by field to make sure you have defined it correctly  here 
NOTE: I am not using a JPOS packager, but i am making use of a JPOS channel...and, i have my code up there (the only change i made up there..is to add my fields from 0-the last.

I will probably need an explanation for this please, so i can know the things to do and the things not to do.

Mark Salter

unread,
Aug 16, 2016, 10:34:30 AM8/16/16
to jPOS Users
1. Stop.
2. Learn how to reply to a post, maintaining quoted portions so we can see what you are asking and what you are not
    I appreciate google reply editor doesn;'t help here but you could/should be able to do better please.
3. Learn posting etiquette - trim your posts
4. Read http://www.catb.org/esr/faqs/smart-questions.html - this advise is long overdue.



On Tuesday, August 16, 2016 at 3:14:21 PM UTC+1, Israel Meshileya wrote:
already done my HOMEWORK..on using the packager from the server, now i am actually facing this little challenge
This is not a challenge you need to share here, please take the advice already given and use it.

      <field id="0" value="800&#2;"/>
Here it is wrong, this should very likely be 0800 ...

... it pushes all the rest of the data out, but manages to complete the parse - you got 'lucky'

5. Get your specification and read it.

6. Have your reply code check the MTI - for validity and so you know what you are replying to, instead of trying to echo back a poorly formed MTI in your reply...


      <field id="0" value="8010"/>

7. Perhaps time to form a Israels.'j'POS mailing list for more on topic discussions about your code and your interfaces to jPOS, then we can discuss jPOS here and you can please continue to keep your code to yourself.

:-)

8.  If you really want to reinvent the wheel, then please feel free, but also feel free to keep it to yourself and to please keep the topics here directly related to jPOS.

Thanks

--
Mark

chhil

unread,
Aug 16, 2016, 11:58:58 AM8/16/16
to jpos-...@googlegroups.com
Try using the attached file.
I fixed your field alignments for the few fields involved in the message you are sending (I am assuming you are talking to a postilion system). 
If unpacking of the response doesn't work fix it yourself.
If it doesn't work, discard this attachment and continue trying to understand how ISO messages work and how fields are packed.
Looks like you can't debug your own packager or understand how to configure your packager with instructions on how the fields are supposed to be.

Hopefully my last Off Topic response here.

-chhil



isoo8583.java

Israel Meshileya

unread,
Aug 16, 2016, 12:37:05 PM8/16/16
to jPOS Users
Thanks so much for your time @chill, i really appreciate...I have been able to rectify it, sending and getting my required response from the postilion system.
whenever i see your post, i know there will definitely be an answer somewhere.
Everything is solved already. (helping me to shortening the long JOURNEY already :) :) thanks.).

chhil

unread,
Aug 16, 2016, 12:59:56 PM8/16/16
to jpos-...@googlegroups.com
You are welcome.

I hope you realize that your questions are not jpos related and this is NOT the forum/group to ask them. 
You will probably not get a response to off topic queries in the future.
You should try stackoverflow.com or talk to the guys of the system you are interfacing to, for assistance.

Try to understand what you are doing, try to understand the code you are using, be professional about it.
I wish you the best with your project.
-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
 
Join us in IRC at http://webchat.freenode.net/?channels=jpos
 
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+unsubscribe@googlegroups.com

For more options, visit this group at http://groups.google.com/group/jpos-users
---
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/f3648564-5241-4a82-8d39-25850743acde%40googlegroups.com.

Victor Salaman

unread,
Aug 16, 2016, 1:08:30 PM8/16/16
to jpos-...@googlegroups.com
Luckily we have you to reply to off topic questions and dedicate time to these endless threads :) Now, can you explain in detail where babies come from? :)

And whats the meaning of life?

/V

Sent from my iPhone
To unsubscribe, send email to jpos-users+...@googlegroups.com

For more options, visit this group at http://groups.google.com/group/jpos-users
---
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 view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAPazefCU%3DShJ_WCijE1eqT99D2HG6C6CzqN0o_YxfyVBOCDeVQ%40mail.gmail.com.

chhil

unread,
Aug 16, 2016, 1:09:58 PM8/16/16
to jpos-...@googlegroups.com
42 :)

--
--
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
 
Join us in IRC at http://webchat.freenode.net/?channels=jpos
 
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
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+unsubscribe@googlegroups.com.

Israel Meshileya

unread,
Aug 24, 2016, 12:28:46 PM8/24/16
to jPOS Users
I can now use JPOS on my Android device, by having to make use of some JPOS packages..without the Q2..which was giving me a little challenge....., I now have a smooth connection... :) :)

Thanks to you all in here....I really appreciate. 

Alejandro Revilla

unread,
Aug 24, 2016, 12:40:39 PM8/24/16
to jPOS Users
Awesome! Thank you for the heads-up.



Reply all
Reply to author
Forward
0 new messages