Problem unpacking field 43 (java.lang.NegativeArraySizeException) unpacking field=43, consumed=97

393 views
Skip to first unread message

anil jaladi

unread,
Jul 5, 2012, 7:06:10 AM7/5/12
to jpos-...@googlegroups.com
Hi ,

I have sent a request to ISO server and at server side i am getting correct response in server log, at client log i am getting the following exception.
 <iso-exception> 
      org.jpos.iso.IFA_LLCHAR: Problem unpacking field 43 (java.lang.NegativeArraySizeException) unpacking field=43, consumed=97
      org.jpos.iso.ISOException: org.jpos.iso.IFA_LLLCHAR: Problem unpacking field 43 (java.lang.NegativeArraySizeException) unpacking field=43, consumed=97
    at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:265)
    at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:420)
    at org.jpos.iso.BaseChannel.unpack(BaseChannel.java:902)
    at org.jpos.iso.BaseChannel.receive(BaseChannel.java:670)
    at org.jpos.iso.ISOServer$Session.run(ISOServer.java:130)
    at org.jpos.util.ThreadPool$PooledThread.run(ThreadPool.java:72)
 </iso-exception>


and  i am using ASCII Packager and BCD channel . and my request as follow at client side:

ISOMsg isoMsg = new ISOMsg();
isoMsg.setMTI(Constants.RequestType.MESSAGE_REQUEST.getValue());
isoMsg.set(3,Constants.Services.DEPOSIT_FUNDS_REQUEST.getValue());
isoMsg.set(4, depositFundRequest.getAmount().toString());
isoMsg.set(7, ISODate.getDateTime(today, TimeZone.getTimeZone("GMT+03")));
isoMsg.set(11, ServiceUtils.generate(6));
//isoMsg.set(12, "100629072055");
isoMsg.set(17, ISODate.getDate(today));
//isoMsg.set(24, "200");
isoMsg.set(32, "111111");
//isoMsg.set(35, "6278519999011712");
isoMsg.set(37, ServiceUtils.generate(12));
//isoMsg.set(41, "TERMID01");
//isoMsg.set(43, "11");
isoMsg.set(46,"00KESD000000000000500000000000D0000000000000000KES");
isoMsg.set(49,"KES");
isoMsg.set(102,depositFundRequest.getAccount());
isoMsg.set(123, userContextService.getCurrentUser());//UserId
isoMsg.set(126,Constants.Field126.CASH_IN.getValue());
channel.send (isoMsg);
ISOMsg responseMsg = channel.receive ();

for 43 field  i defined in my packager as

 /*043*/ new IFA_LLCHAR  ( 40, "Card acceptor name/location")

please help me to resolve this exception.


Thank you in advance.

Mark Salter

unread,
Jul 5, 2012, 8:47:46 AM7/5/12
to jPOS Users


On Jul 5, 12:06 pm, anil jaladi <jaladi...@gmail.com> wrote:
> I have sent a request to ISO server and at server side i am getting correct
> response in server log, at client log i am getting the following exception.
>  <iso-exception>
>       org.jpos.iso.IFA_LLCHAR: Problem unpacking field 43
> (java.lang.NegativeArraySizeException)
> unpacking field=43, consumed=97
>       org.jpos.iso.ISOException: org.jpos.iso.IFA_LLLCHAR: Problem
> unpacking field 43 (java.lang.NegativeArraySizeException) unpacking
> field=43, consumed=97

It is very likely *not* field 43 that is the problem, but the
preceeding field leading to the data that the Packager *thinks* is
field 43.

> and  i am using ASCII Packager and BCD channel . and my request as follow
> at client side:
What are you using on the server side?
The Channel and the Packager must match precisly at both ends.

> please help me to resolve this exception.
Add a Logger to your Packager and Channel;- at both server and client
and check the output for what data is going into which fields.
There was a very recent discussion on this very list, I will let you
look for it.
There will be a difference between each ends output (on the response
flow) and where the difference starts will be where your Packager (or
Channel) is different.

I would first check the Channel and Packager are the same, but also
that you are not intrducing any headers to the messages?

--
Mark

Mark Salter

unread,
Jul 6, 2012, 9:48:43 AM7/6/12
to jpos-...@googlegroups.com
Anil, please refrain from sending emails to me off list.
I won't respond to them unless I have initiated the discussion or there
is a large payment attached to the envelope!

:-)

--
Mark
Reply all
Reply to author
Forward
0 new messages