UnPack Error

37 views
Skip to first unread message

Passio...@gmail.com

unread,
Nov 28, 2008, 1:08:00 AM11/28/08
to jpos
When i tried to unpack the dump which i created. i am getting the following exception. The error says error in the field 32, however in my message i don't set any value to the field 32....here is the error trace.

error unpacking field 32
org.jpos.iso.ISOException: org.jpos.iso.IFE_LLNUM: Problem unpacking field 32 (java.lang.ArrayIndexOutOfBoundsException: 447)
at org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.java:209)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:229)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:322)
at genericpackager.Test.main(Test.java:49)
Nested:java.lang.ArrayIndexOutOfBoundsException: 447
at org.jpos.iso.ISOUtil.ebcdicToAsciiBytes(ISOUtil.java:231)
at org.jpos.iso.ISOUtil.ebcdicToAscii(ISOUtil.java:218)
at org.jpos.iso.EbcdicInterpreter.uninterpret(EbcdicInterpreter.java:71)
at org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.java:204)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:229)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:322)
at genericpackager.Test.main(Test.java:49)
Exception in thread "Main Thread" org.jpos.iso.ISOException: org.jpos.iso.IFE_LLNUM: Problem unpacking field 32 (java.lang.ArrayIndexOutOfBoundsE
xception: 447)
at org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.java:209)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:229)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:322)
at genericpackager.Test.main(Test.java:49)
Nested:java.lang.ArrayIndexOutOfBoundsException: 447
at org.jpos.iso.ISOUtil.ebcdicToAsciiBytes(ISOUtil.java:231)
at org.jpos.iso.ISOUtil.ebcdicToAscii(ISOUtil.java:218)
at org.jpos.iso.EbcdicInterpreter.uninterpret(EbcdicInterpreter.java:71)
at org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.java:204)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:229)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:322)
at genericpackager.Test.main(Test.java:49)

Alwyn

unread,
Nov 28, 2008, 1:56:44 AM11/28/08
to jPOS Users
When you say dump, are you saying that you have stored some binary
representation of a message and are now unpacking it 'manually'?

I don't work with jpos very often, but can it be that the way you want
to process the data assumes that it starts with a bitmap, yet you
still
have the message length and/or the MTI in your raw data resulting in
the wrong bitmap?

Passio...@gmail.com

unread,
Nov 28, 2008, 2:14:00 AM11/28/08
to jpos-...@googlegroups.com
I am using a example program (src\examples\genericpackager\Test.java) which in JPOS 1.4 which will convert the dump which we created using jpos to human readable format.
For this example I used my generic XML file and dump which I created. However when I am creating the dump it is created correctly, but during unpacking the data using the above example program I am getting the exception.. If I change the datatype org.jpos.iso.IFE_LLCHAR to org.jpos.iso.IFE_CHAR then the error disappear… However it says array out of bound exception for the field where I not set any value to that field in my message.

Any thought will be appreciated. Thanks a lot

Mark Salter

unread,
Nov 28, 2008, 2:44:49 AM11/28/08
to jpos-...@googlegroups.com
Passio...@gmail.com wrote:
> However when I am creating the dump it is created correctly, but
> during unpacking the data using the above example program I am
> getting the exception..
Both of your Exceptions are caused by the packager not matching the
'dump' or binary data.

In the first instance:-

> error unpacking field 32 org.jpos.iso.ISOException:
> org.jpos.iso.IFE_LLNUM: Problem unpacking field 32
> (java.lang.ArrayIndexOutOfBoundsException: 447)

The IFE_LLNUM is hitting a part of the data that it takes as a length,
but the data interpreted generates a length which exceeds the available
bytes in the dump.

In the second:-


> If I change the datatype org.jpos.iso.IFE_LLCHAR to
> org.jpos.iso.IFE_CHAR then the error disappear… However it says array
> out of bound exception for the field where I not set any value to
> that field in my message.

Dropping the length part of the field allow this field to now take the
length number of bytes, but will push all of the following fields in the
dump out.

If you make sure your packager *exactly* matches the message format (and
thus dump), all will be well.

If you add a Logger to the packager, that will help you. If you can't
see what is wrong, post the packager *and* the log output *and* he dump
(in a format we can read (hexadecimal perhaps). Someone here will spot
your error.

You should note that the exercise of building or using the correct
packager is something you should already have done, on a field by filed
basis. Avoiding this step causes *us* work 8).

--
Mark

Reply all
Reply to author
Forward
0 new messages