my system works with 1.5.0 and fails with 1.5.1
I think we can safely say there is something different rather something
wrong between this two versions.
>
> my system works with 1.5.0 and fails with 1.5.1
Can you elaborate on 'fails' please?
Is it possible the packager is different between the versions, the
classpath you use, or how about the Channel.
With so little detail it is almost impossible to advise.
Please post the exact error you see, and include something about the
packager and the Channel you are using.
You might care to skim through :-
http://www.catb.org/~esr/faqs/smart-questions.html
you may find it a useful reference point.
--
Mark
Thanks Mark, :) i couldn't make much sense of my question after
reading through it a second time. i would try to explain in detail the
issue im facing (English isn't my first language :)).
I have a project where im using jpos 1.5.0 with q2 , i am using a
custom packager over a PostChannel, within a ChannelAdaptor. this
works fine with my host i can pack and unpack messages properly.
I got jpos_ee and deployed the same q2 config file when i send
transactions , jpos fails to unpack the response from the host, it
complains of not being able to unpack field 2, however it packs it
properly to the host,
i built two test applications stripping all the other components, in
one test i have jpos 1.5.0 and in the other jpos 1.5.1 (which is the
version that came with my jpos_ee build). all the other dependencies
were the same, the test applications are the same as well however the
one with 1.5.1 fails to unpack field 2.
i assumed it may have been a problem with the host, so i use a
server_simulator within jpos_ee and i get the same unable to unpack 2
error.
a code snippet from my packager
public class FinaclePackager extends ISOBasePackager{
protected ISOFieldPackager fld[] = {
/*000*/ new IFA_NUMERIC ( 4, "MESSAGE TYPE INDICATOR"),
/*001*/ new IFB_BITMAP ( 8, "BIT MAP"),
/*002*/ new IFA_LLNUM ( 19, "PAN - PRIMARY ACCOUNT NUMBER"),
/*003*/ new IFA_NUMERIC ( 6, "PROCESSING CODE"),
/*004*/ new IFA_NUMERIC ( 16, "AMOUNT, TRANSACTION"),
/*005*/ new IFA_NUMERIC ( 12, "AMOUNT, SETTLEMENT"),
/*006*/ new IFA_NUMERIC ( 12, "AMOUNT, CARDHOLDER BILLING"),
the error log
error unpacking field 2
org.jpos.iso.ISOException: org.jpos.iso.IFA_LLNUM: Problem unpacking
field 2 (ja
va.lang.NegativeArraySizeException)
at
org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.jav
a:209)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:
235)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:322)
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:552)
at org.jpos.q2.iso.ChannelAdaptor
$Receiver.run(ChannelAdaptor.java:268)
at java.lang.Thread.run(Unknown Source)
Nested:java.lang.NegativeArraySizeException
at
org.jpos.iso.AsciiInterpreter.uninterpret(AsciiInterpreter.java:85)
at
org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.jav
a:204)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:
235)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:322)
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:552)
at org.jpos.q2.iso.ChannelAdaptor
$Receiver.run(ChannelAdaptor.java:268)
at java.lang.Thread.run(Unknown Source)
<log realm="channel/10.100.21.212:41448" at="Tue Apr 03 12:53:50 GMT
2007.156">
<receive>
<iso-exception>
org.jpos.iso.IFA_LLNUM: Problem unpacking field 2
<nested-exception>
java.lang.NegativeArraySizeException
at
org.jpos.iso.AsciiInterpreter.uninterpret(AsciiInterpreter.java:85)
at
org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.jav
a:204)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:
235)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:322)
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:552)
at org.jpos.q2.iso.ChannelAdaptor
$Receiver.run(ChannelAdaptor.java:268)
at java.lang.Thread.run(Unknown Source)
</nested-exception>
org.jpos.iso.ISOException: org.jpos.iso.IFA_LLNUM: Problem
unpacking field
2 (java.lang.NegativeArraySizeException)
at
org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.jav
a:209)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:
235)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:322)
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:552)
at org.jpos.q2.iso.ChannelAdaptor
$Receiver.run(ChannelAdaptor.java:268)
at java.lang.Thread.run(Unknown Source)
Nested:java.lang.NegativeArraySizeException
at
org.jpos.iso.AsciiInterpreter.uninterpret(AsciiInterpreter.java:85)
at
org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.jav
a:204)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:
235)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:322)
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:552)
at org.jpos.q2.iso.ChannelAdaptor
$Receiver.run(ChannelAdaptor.java:268)
at java.lang.Thread.run(Unknown Source)
</iso-exception>
--- data ---
0000 31 32 31 30 F0 30 80 01 06 81 80 00 00 00 00 00
1210.0..........
0010 00 00 00 22 31 39 36 32 37 37 35 32 30 30 30
30 ..."196277520000
0020 31 37 30 30 36 33 30 30 31 34 30 30 30 30 30 30
1700630014000000
0030 30 30 30 30 30 30 30 30 30 30 31 30 30 30 30 30
0000000000100000
0040 30 30 30 30 30 30 30 30 30 30 31 32 30 30 37 30
0000000000120070
0050 34 30 33 31 32 35 33 34 39 32 30 30 37 30 34 30
4031253492007040
0060 33 30 33 30 33 33 55 4E 49 30 30 30 31 31 39 50
303033UNI000119P
0070 41 59 50 41 54 48 20 20 20 20 20 20 20 20 20 32 AYPATH
2
0080 30 34 2B 30 30 30 30 30 30 31 34 32 33 37 36 37
04+0000001423767
0090 32 36 30 2B 30 30 30 30 30 30 31 34 32 33 37 36
260+000000142376
00a0 37 32 36 30 2B 30 30 30 30 30 30 30 30 30 30 30
7260+00000000000
00b0 30 30 30 30 30 2B 30 30 30 30 30 30 30 30 30 30
00000+0000000000
00c0 30 30 30 30 30 30 2B 30 30 30 30 30 30 31 34 32
000000+000000142
00d0 33 37 36 37 32 36 30 4E 47 4E 20 20 20 20 20 20 3767260NGN
00e0 20 20 20 20 20 20 20 20 2B 30 30 30 30 30 30 30
+0000000
00f0 30 32 33 38 35 32 37 39 30 2B 30 30 30 30 30 30
023852790+000000
0100 30 30 32 33 38 35 32 37 39 30 2B 30 30 30 30 30
0023852790+00000
0110 30 30 30 30 30 30 30 30 30 30 30 2B 30 30 30 30
00000000000+0000
0120 30 30 30 30 30 30 30 30 30 30 30 30 2B 30 30 30
000000000000+000
0130 30 30 30 30 30 32 33 38 35 32 37 39 30 4E 47 4E
0000023852790NGN
0140 20 20 20 20 20 20 20 20 20 20 20 20 20 20 30 30
00
0150 33 35 36 36 30 33 41 49 52 30 35 32 56 61 6C 75
356603AIR052Valu
0160 65 20 64 61 74 65 20 63 61 6E 6E 6F 74 20 62 65 e date cannot
be
0170 20 6C 61 74 65 72 20 74 68 61 6E 20 75 73 65 72 later than
user
0180 20 73 70 65 63 69 66 69 65 64 20 64 61 74 30 30 specified
dat00
</receive>
</log>
<log realm="org.jpos.q2.iso.ChannelAdaptor" at="Tue Apr 03 12:53:50
GMT 2007.203
">
<warn>
channel-receiver-bancs-recieve
<iso-exception>
org.jpos.iso.IFA_LLNUM: Problem unpacking field 2
<nested-exception>
java.lang.NegativeArraySizeException
at
org.jpos.iso.AsciiInterpreter.uninterpret(AsciiInterpreter.java:85)
at
org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.jav
a:204)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:
235)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:322)
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:552)
at org.jpos.q2.iso.ChannelAdaptor
$Receiver.run(ChannelAdaptor.java:268)
at java.lang.Thread.run(Unknown Source)
</nested-exception>
org.jpos.iso.ISOException: org.jpos.iso.IFA_LLNUM: Problem
unpacking field
2 (java.lang.NegativeArraySizeException)
at
org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.jav
a:209)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:
235)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:322)
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:552)
at org.jpos.q2.iso.ChannelAdaptor
$Receiver.run(ChannelAdaptor.java:268)
at java.lang.Thread.run(Unknown Source)
Nested:java.lang.NegativeArraySizeException
at
org.jpos.iso.AsciiInterpreter.uninterpret(AsciiInterpreter.java:85)
at
org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.jav
a:204)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:
235)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:322)
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:552)
at org.jpos.q2.iso.ChannelAdaptor
$Receiver.run(ChannelAdaptor.java:268)
at java.lang.Thread.run(Unknown Source)
</iso-exception>
http://jpos.org/download/jpos-1.6.0.jar
In addition, it may help to add debugging at the packager level, you can
do that by adding the following two properties inside your channel
definition:
<property name="packager-logger" value="Q2" />
<property name="packager-realm" value="packager-debug" />
--Alejandro
> at org.jpos.iso.ISOMsg.unpack (ISOMsg.java:322)
> at org.jpos.iso.BaseChannel.receive(BaseChannel.java:552)
> at org.jpos.q2.iso.ChannelAdaptor
> $Receiver.run(ChannelAdaptor.java:268)
> at java.lang.Thread.run (Unknown Source)
> Nested:java.lang.NegativeArraySizeException
> at
> org.jpos.iso.AsciiInterpreter.uninterpret(AsciiInterpreter.java:85)
> at
> org.jpos.iso.ISOStringFieldPackager.unpack (ISOStringFieldPackager.jav
> a:204)
> at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:
> 235)
> at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:322)
> at org.jpos.iso.BaseChannel.receive (BaseChannel.java:552)
> 235)
> at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:322)
> at org.jpos.iso.BaseChannel.receive(BaseChannel.java:552)
> at org.jpos.q2.iso.ChannelAdaptor
> $Receiver.run(ChannelAdaptor.java:268)
> at java.lang.Thread.run(Unknown Source)
> Nested:java.lang.NegativeArraySizeException
> at
> org.jpos.iso.AsciiInterpreter.uninterpret (AsciiInterpreter.java:85)
> org.jpos.iso.AsciiInterpreter.uninterpret (AsciiInterpreter.java:85)
> at
> org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.jav
> a:204)
> at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:
> 235)
> at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:322)
> at org.jpos.iso.BaseChannel.receive(BaseChannel.java:552)
> at org.jpos.q2.iso.ChannelAdaptor
> $Receiver.run(ChannelAdaptor.java :268)
> at java.lang.Thread.run(Unknown Source)
> </nested-exception>
> org.jpos.iso.ISOException: org.jpos.iso.IFA_LLNUM: Problem
> unpacking field
> 2 (java.lang.NegativeArraySizeException )
> at
> org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.jav
> a:209)
> at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:
> 235)
> at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:322)
> at org.jpos.iso.BaseChannel.receive(BaseChannel.java:552)
> at org.jpos.q2.iso.ChannelAdaptor
> $Receiver.run(ChannelAdaptor.java:268)
> at java.lang.Thread.run(Unknown Source)
> Nested:java.lang.NegativeArraySizeException
> at
> org.jpos.iso.AsciiInterpreter.uninterpret(AsciiInterpreter.java:85)
> at
> org.jpos.iso.ISOStringFieldPackager.unpack (ISOStringFieldPackager.jav
> a:204)
> at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:
> 235)
> at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:322)
> at org.jpos.iso.BaseChannel.receive (BaseChannel.java:552)
I think we should see what Alejandro's suggestion gives:-
> On 4/3/07, *Alejandro Revilla* < a...@jpos.org <mailto:a...@jpos.org>> wrote:
>
> Before we dive into a debugging session, can you give it a try using
> the
> latest jpos-1.6.0.jar ? You can get a precompiled version here:
>
> http://jpos.org/download/jpos-1.6.0.jar
>
> In addition, it may help to add debugging at the packager level, you
> can
> do that by adding the following two properties inside your channel
> definition:
>
> <property name="packager-logger" value="Q2" />
> <property name="packager-realm" value="packager-debug" />
--
Mark
Exception in thread "main" java.lang.NoClassDefFoundError: org/jpos/
util/LogListener
what other steps can i take?
> ...
>
> read more »
Can you see the source for LogListener?
Are you now trying to use jpos1.6.0 *instead* of jpos1.5.0/1 at both
ends, or just to simulate the host that you don't have real-time access to?
> what other steps can i take?
See above for the jpos1.6.0 issue.
For the initial problem, I wonder if it was an issue with the IFB_BITMAP
handling of the message?
Does your request include fields in the second bitmap?
The response appears to, so what if your IFB_BITMAP class is not taking
into account the second eight bytes giving the starting location of
field 2 as 0000000000000022, this would give a length of 00, and perhaps
even hint at the negative size Exception you see.
Could you try build a request with and without fields in the second
bitmap and see if a pack/unpack of the message works?
I feel this is something specific to your environment as others would
have had trouble if IFB_BITMAP just didn't work.
I was going to ask you to run the jpos unit tests, but I can't
immediately see that we have a test for IFB_BITMAP, I will try to find
or add some tests shortly.
--
Mark
> a code snippet from my packager
>
> public class FinaclePackager extends ISOBasePackager{
>
> protected ISOFieldPackager fld[] = {
> /*000*/ new IFA_NUMERIC ( 4, "MESSAGE TYPE INDICATOR"),
> /*001*/ new IFB_BITMAP ( 8, "BIT MAP"),
Building some tests to make certain of my own thoughts...
Can you make your BITMAP definition :-
/*001*/ new IFB_BITMAP ( 16, "BIT MAP"),
and try again please?
The reply you are unpacking indicates a second bit map, but you have not
left 'room' for it. Currently only the first 8 bytes of the bitmap
passed will be taken as the bitmap, making the PAN detail start on the
following 8 bytes (0000000000000022). I feel this explains the Exception.
Of course this should be the same on both versions you have tried it on,
unless the server responds with fields 123 & 127 on requests from 1.5.0?
Are these echo fields, might they be being suppressed on the 1.5.0
request to the server, perhaps for a similar reason?
--
Mark
HI Mark
I had the same error but when I tried what you said. I works! Thank even if its not my thread!
Can you make your BITMAP definition :-
/*001*/ new IFB_BITMAP ( 16, "BIT MAP"),
and try again please?