Pat Chan | 4 Dec 2006 01:32
Picon
Favicon

pos/res/jpos.properties file not found

Hi,
I am trying to use jpos with an applet. However, I keep
getting "jpos/res/jpos.properties file not found ". Any one had the
same issue before or do you know where I should place the
jpos.properties file? Actually the properties file is inside the jar
right now. It works fine with the java application. Thanks

__._,_.___
Recent Activity
Visit Your Group
SPONSORED LINKS
Need traffic?

Drive customers

With search ads

on Yahoo!

Y! Toolbar

Get it Free!

easy 1-click access

to your groups.

Yahoo! Groups

Start a group

in 3 easy steps.

Connect with others.

.

__,_._,___
Erick Rojas | 6 Dec 2006 00:53
Picon
Favicon

Error on BASE24TCPChannel


I have this error when a receive a response from host , but i have
define the field 63 with a length==63
<isofield
id="63"
length="999"
name="RESERVED PRIVATE"
class="org.jpos.iso.IFA_LLLCHAR"/>

which is the error?

[java] <warn>
[java] channel-receiver-sample-receive
[java] <iso-exception>
[java] org.jpos.iso.IFA_LLLCHAR: Problem unpacking field 63
[java] <nested-exception>
[java] java.lang.ArrayIndexOutOfBoundsException: 289
[java] at
org.jpos.iso.AsciiInterpreter.uninterpret(AsciiInterpreter.ja
88)
[java] at
org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPack
r.java:204)
[java] at
org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:229)

[java] at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:322)
[java] at org.jpos.iso.BaseChannel.receive(BaseChannel.java:531)
[java] at
org.jpos.q2.iso.ChannelAdaptor$Receiver.run(ChannelAdaptor.ja
266)
[java] at java.lang.Thread.run(Thread.java:534)
[java] </nested-exception>
[java] org.jpos.iso.ISOException: org.jpos.iso.IFA_LLLCHAR:
Problem u
cking field 63 (java.lang.ArrayIndexOutOfBoundsException: 289)
[java] at
org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPack
r.java:209)
[java] at
org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:229)

[java] at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:322)
[java] at org.jpos.iso.BaseChannel.receive(BaseChannel.java:531)
[java] at
org.jpos.q2.iso.ChannelAdaptor$Receiver.run(ChannelAdaptor.ja
266)
[java] at java.lang.Thread.run(Thread.java:534)
[java] Nested:java.lang.ArrayIndexOutOfBoundsException: 289
[java] at
org.jpos.iso.AsciiInterpreter.uninterpret(AsciiInterpreter.ja
88)
[java] at
org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPack
r.java:204)
[java] at
org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:229)

[java] at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:322)
[java] at org.jpos.iso.BaseChannel.receive(BaseChannel.java:531)
[java] at
org.jpos.q2.iso.ChannelAdaptor$Receiver.run(ChannelAdaptor.ja
266)
[java] at java.lang.Thread.run(Thread.java:534)
[java] </iso-exception>
[java] </warn>
[java] </log>

__._,_.___
Recent Activity
Visit Your Group
SPONSORED LINKS
New business?

Get new customers.

List your web site

in Yahoo! Search.

Y! Toolbar

Get it Free!

easy 1-click access

to your groups.

Yahoo! Groups

Start a group

in 3 easy steps.

Connect with others.

.

__,_._,___
Mark Salter | 6 Dec 2006 10:21

Re: Error on BASE24TCPChannel

Erick Rojas wrote:
>
> I have this error when a receive a response from host , but i have
> define the field 63 with a length==63
Looks like 999 to me...
> <isofield
> id="63"
> length="999"
> name="RESERVED PRIVATE"
> class="org.jpos.iso.IFA_LLLCHAR"/>
>
> which is the error?
I think it likely that it is a previous field definition that is error,
resulting in JPos trying to parse field 63 somewhere beyond the
available data in the message. Imagine if the bytes that 63 took as
it's length was slightly out due to a previous error.

Do you have a message dump/trace?

Do the fields previous to 63 all line up nicely?

--
Mark

__._,_.___
Recent Activity
Visit Your Group
SPONSORED LINKS
Need traffic?

Drive customers

With search ads

on Yahoo!

Y! Toolbar

Get it Free!

easy 1-click access

to your groups.

Yahoo! Groups

Start a group

in 3 easy steps.

Connect with others.

.

__,_._,___
Erick Rojas | 6 Dec 2006 15:55
Picon
Favicon

Re: Error on BASE24TCPChannel

yes , sorry Mark , the length is 999

the trace is

<send>
<isomsg direction="outgoing">
<header>49534F303233343030303730</header>
<field id="0" value="0200"/>
<field id="3" value="000000"/>
<field id="4" value="44"/>
<field id="7" value="1205191834"/>
<field id="11" value="000092"/>
<field id="12" value="131834"/>
<field id="13" value="1205"/>
<field id="17" value="1205"/>
<field id="22" value="908"/>
<field id="25" value="00"/>
<field id="32" value="12"/>
<field id="35" value="415231______0578=1007________________"/>
<field id="37" value=" "/>
<field id="41" value="00000001"/>
<field id="43"
value=" "/>
<field id="48" value="2082204 "/>
<field id="49" value="484"/>
<field id="63" value="&amp; 0000500102! Q100002 9 ! Q200002 04!
0400020 ! C000026 798 001 0 1 0 "/>
</isomsg>
</send>
</log>
<log realm="channel/128.36.40.11:7492" at="Tue Dec 05 12:22:57 CST
2006.375">
<got-message-length>
302
</got-message-length>
</log>
<log realm="channel/128.36.40.11:7492" at="Tue Dec 05 12:22:57 CST
2006.375">
<get-message-trailler/>
</log>
<log realm="channel/128.36.40.11:7492" at="Tue Dec 05 12:22:57 CST
2006.375">
<got-message-trailler>
20
</got-message-trailler>
</log>
<log realm="channel/128.36.40.11:7492" at="Tue Dec 05 12:22:57 CST
2006.578">
<receive>
<iso-exception>
org.jpos.iso.IFA_LLLCHAR: Problem unpacking field 63
<nested-exception>
java.lang.ArrayIndexOutOfBoundsException: 289
at org.jpos.iso.AsciiInterpreter.uninterpret
(AsciiInterpreter.java:88)
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 org.jpos.iso.BaseChannel.receive(BaseChannel.java:531)
at org.jpos.q2.iso.ChannelAdaptor$Receiver.run
(ChannelAdaptor.java:266)
at java.lang.Thread.run(Thread.java:534)
</nested-exception>
org.jpos.iso.ISOException: org.jpos.iso.IFA_LLLCHAR: Problem
unpacking field 63 (java.lang.ArrayIndexOutOfBoundsException: 289)
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 org.jpos.iso.BaseChannel.receive(BaseChannel.java:531)
at org.jpos.q2.iso.ChannelAdaptor$Receiver.run
(ChannelAdaptor.java:266)
at java.lang.Thread.run(Thread.java:534)
Nested:java.lang.ArrayIndexOutOfBoundsException: 289
at org.jpos.iso.AsciiInterpreter.uninterpret
(AsciiInterpreter.java:88)
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 org.jpos.iso.BaseChannel.receive(BaseChannel.java:531)
at org.jpos.q2.iso.ChannelAdaptor$Receiver.run
(ChannelAdaptor.java:266)
at java.lang.Thread.run(Thread.java:534)
</iso-exception>
--- header ---
0000 49 53 4F 30 32 34 30 30 30 30 37 37
ISO024000077

--- data ---
0000 30 32 31 30 33 32 33 41 38 34 38 30 32 45 38 31
0210323A84802E81
0010 38 30 30 32 30 30 30 30 30 30 30 30 30 30 30 30
8002000000000000
0020 30 30 30 30 34 34 31 32 30 35 31 39 31 38 33 34
0000441205191834
0030 30 30 30 30 39 32 31 33 31 38 33 34 31 32 30 35
0000921318341205
0040 31 32 30 34 31 32 30 34 39 30 38 30 30 33 37 34
1204120490800374
0050 31 35 32 33 31 30 39 33 37 36 38 30 35 37 38 3D
152310937680578=
0060 31 30 30 37 31 32 36 30 30 30 30 30 38 36 33 30
1007126000008630
0070 30 30 30 30 20 20 20 20 20 20 20 20 20 20 20 20
0000
0080 32 30 35 34 34 30 30 30 30 30 30 30 30 30 30 31
2054400000000001
0090 20 20 20 20 20 20 20 20 30 32 37 32 30 38 32 32
02720822
00a0 30 34 20 20 20 20 20 20 20 20 20 20 20 20 20 20
04
00b0 20 20 20 20 20 20 34 38 34 31 30 32 26 20 30 30 484102&
00
00c0 30 30 35 30 30 31 30 32 21 20 51 31 30 30 30 30 00500102!
Q10000
00d0 32 20 39 20 21 20 51 32 30 30 30 30 32 20 30 34 2 9 ! Q200002
04
00e0 21 20 30 34 30 30 30 32 30 20 20 20 20 20 20 20 !
0400020
00f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 21
20 !
0100 43 30 30 30 30 32 36 20 37 39 38 20 20 30 30 31 C000026 798
001
0110 20 20 20 20 20 20 20 20 20 20 30 20 20 31 20 30 0
1 0
0120 20

</receive>
</log>
<log realm="org.jpos.q2.iso.ChannelAdaptor" at="Tue Dec 05 12:22:57
CST 2006.812">
<warn>
channel-receiver-sample-receive
<iso-exception>
org.jpos.iso.IFA_LLLCHAR: Problem unpacking field 63
<nested-exception>
java.lang.ArrayIndexOutOfBoundsException: 289
at org.jpos.iso.AsciiInterpreter.uninterpret
(AsciiInterpreter.java:88)
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 org.jpos.iso.BaseChannel.receive(BaseChannel.java:531)
at org.jpos.q2.iso.ChannelAdaptor$Receiver.run
(ChannelAdaptor.java:266)
at java.lang.Thread.run(Thread.java:534)
</nested-exception>
org.jpos.iso.ISOException: org.jpos.iso.IFA_LLLCHAR: Problem
unpacking field 63 (java.lang.ArrayIndexOutOfBoundsException: 289)
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 org.jpos.iso.BaseChannel.receive(BaseChannel.java:531)
at org.jpos.q2.iso.ChannelAdaptor$Receiver.run
(ChannelAdaptor.java:266)
at java.lang.Thread.run(Thread.java:534)
Nested:java.lang.ArrayIndexOutOfBoundsException: 289
at org.jpos.iso.AsciiInterpreter.uninterpret
(AsciiInterpreter.java:88)
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 org.jpos.iso.BaseChannel.receive(BaseChannel.java:531)
at org.jpos.q2.iso.ChannelAdaptor$Receiver.run
(ChannelAdaptor.java:266)
at java.lang.Thread.run(Thread.java:534)
</iso-exception>
</warn>
</log>
<log realm="channel/128.36.40.11:7492" at="Tue Dec 05 12:22:57 CST
2006.812">
<disconnect>
128.36.40.11:7492
</disconnect>
</log>
<log realm="channel/128.36.40.11:7492" at="Tue Dec 05 12:22:57 CST
2006.875">
<connect>
128.36.40.11:7492
</connect>
</log>
<log realm="channel/128.36.40.11:7492" at="Tue Dec 05 12:22:58 CST
2006.828">
<get-message-length/>
</log>

Can you explain how works Base24TCPChannel in the response ?, because

the host don´t send a etx, only the message lenght.

--- In jpos-dev <at> yahoogroups.com, Mark Salter <marksalter <at> ...> wrote:
>
> Erick Rojas wrote:
> >
> > I have this error when a receive a response from host , but i
have
> > define the field 63 with a length==63
> Looks like 999 to me...
> > <isofield
> > id="63"
> > length="999"
> > name="RESERVED PRIVATE"
> > class="org.jpos.iso.IFA_LLLCHAR"/>
> >
> > which is the error?
> I think it likely that it is a previous field definition that is
error,
> resulting in JPos trying to parse field 63 somewhere beyond the
> available data in the message. Imagine if the bytes that 63 took as
> it's length was slightly out due to a previous error.
>
> Do you have a message dump/trace?
>
> Do the fields previous to 63 all line up nicely?
>
> --
> Mark
>

__._,_.___
Recent Activity
Visit Your Group
SPONSORED LINKS
New business?

Get new customers.

List your web site

in Yahoo! Search.

Y! Toolbar

Get it Free!

easy 1-click access

to your groups.

Yahoo! Groups

Start a group

in 3 easy steps.

Connect with others.

.

__,_._,___
Mark Salter | 6 Dec 2006 20:52

Re: Re: Error on BASE24TCPChannel

Erick Rojas wrote:
> yes , sorry Mark , the length is 999
8)
>
>
> the trace is
>

> --- header ---
> 0000 49 53 4F 30 32 34 30 30 30 30 37 37
> ISO024000077
>
> --- data ---
> 0000 30 32 31 30 33 32 33 41 38 34 38 30 32 45 38 31 > 0210323A84802E81
> 0010 38 30 30 32 30 30 30 30 30 30 30 30 30 30 30 30 > 8002000000000000
> 0020 30 30 30 30 34 34 31 32 30 35 31 39 31 38 33 34 > 0000441205191834
> 0030 30 30 30 30 39 32 31 33 31 38 33 34 31 32 30 35 > 0000921318341205
> 0040 31 32 30 34 31 32 30 34 39 30 38 30 30 33 37 34 > 1204120490800374
> 0050 31 35 32 33 31 30 39 33 37 36 38 30 35 37 38 3D > 152310937680578=
> 0060 31 30 30 37 31 32 36 30 30 30 30 30 38 36 33 30 > 1007126000008630
> 0070 30 30 30 30 20 20 20 20 20 20 20 20 20 20 20 20 > 0000
> 0080 32 30 35 34 34 30 30 30 30 30 30 30 30 30 30 31 > 2054400000000001
> 0090 20 20 20 20 20 20 20 20 30 32 37 32 30 38 32 32 > 02720822
> 00a0 30 34 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > 04

Field 63 starts here? |
|
> 00b0 20 20 20 20 20 20 34 38 34 31 30 32 26 20 30 30 484102& 00
> 00c0 30 30 35 30 30 31 30 32 21 20 51 31 30 30 30 30 00500102! Q10000
> 00d0 32 20 39 20 21 20 51 32 30 30 30 30 32 20 30 34 2 9 ! Q200002 > 04
> 00e0 21 20 30 34 30 30 30 32 30 20 20 20 20 20 20 20 ! 0400020
> 00f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 21 20 !
> 0100 43 30 30 30 30 32 36 20 37 39 38 20 20 30 30 31 C000026 798 001
> 0110 20 20 20 20 20 20 20 20 20 20 30 20 20 31 20 30 0 1 0
> 0120 20
>
Length of 102 is one byte too many?

So the unpack is trying to go off the end of the available message. In
your request there are two blanks at the end of field 63, I guess the
host is not echoing the whole field, it is dropping the last space byte
and not adjusting the length.

Perhaps the channel is stripping this last byte of field 63 *because*
the host is not sending the ETX?

> Can you explain how works Base24TCPChannel in the response ?, because
> the host don´t send a etx, only the message lenght.
The length is enough to work with, the ETX will be needed *if* the
channel expects it. I guess (again) that the ETX is being stripped off
in the Channel.

--
Mark

__._,_.___
Recent Activity
Visit Your Group
SPONSORED LINKS
Ads on Yahoo!

Learn more now.

Reach customers

searching for you.

Y! Toolbar

Get it Free!

easy 1-click access

to your groups.

Yahoo! Groups

Start a group

in 3 easy steps.

Connect with others.

.

__,_._,___
Erick Rojas | 6 Dec 2006 21:09
Picon
Favicon

Re: Error on BASE24TCPChannel

Thank you very much Mark

no, the field 63 starts from

102& 00
00c0 30 30 35 30 30 31 30 32 21 20 51 31 30 30 30 30 00500102! Q10000
00d0 32 20 39 20 21 20 51 32 30 30 30 30 32 20 30 34 2 9 ! Q200002 04
00e0 21 20 30 34 30 30 30 32 30 20 20 20 20 20 20 20 ! 0400020
00f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 21 20 !
0100 43 30 30 30 30 32 36 20 37 39 38 20 20 30 30 31 C000026 798 001
0110 20 20 20 20 20 20 20 20 20 20 30 20 20 31 20 30 0 1 0
0120 20

with the sniffer i found that the host don´t send me a ETX, but i
in the request send the ETX.

0000 00 00 01 00 00 00 c0 7e 20 00 01 00 08 00 45 00 .......~ .....E.
0010 01 58 9c 0a 00 00 3e 06 6e 5e 80 24 28 0b be 0a .X....>.n^.$(...
0020 0a fe 1d 44 12 4b 30 3e 9a 09 e7 37 09 ae 50 18 ...D.K0>...7..P.
0030 2c cc 0f 2c 00 00 01 2e 49 53 4f 30 32 34 30 30 ,..,....ISO02400
0040 30 30 37 37 30 32 31 30 33 32 33 41 38 34 38 30 00770210323A8480
0050 32 45 38 31 38 30 30 32 30 30 30 30 30 30 30 30 2E81800200000000
0060 30 30 30 30 30 30 30 30 34 34 31 32 30 35 31 38 0000000044120518
0070 35 30 30 31 30 30 30 30 38 39 31 32 35 30 30 31 5001000089125001
0080 31 32 30 35 31 32 30 34 31 32 30 34 39 30 38 30 1205120412049080
0090 30 33 37 34 31 35 32 33 31 30 39 33 37 36 38 30 0374152310937680
00a0 35 37 38 3d 31 30 30 37 31 32 36 30 30 30 30 30 578=100712600000
00b0 38 36 33 30 30 30 30 30 20 20 20 20 20 20 20 20 86300000
00c0 20 20 20 20 30 30 30 30 30 30 31 34 30 30 30 30 000000140000
00d0 30 30 30 31 20 20 20 20 20 20 20 20 30 32 37 32 0001 0272
00e0 30 38 32 32 30 34 20 20 20 20 20 20 20 20 20 20 082204
00f0 20 20 20 20 20 20 20 20 20 20 38 34 30 31 30 32 840102
0100 26 20 30 30 30 30 35 30 30 31 30 32 21 20 51 31 & 0000500102! Q1
0110 30 30 30 30 32 20 39 20 21 20 51 32 30 30 30 30 00002 9 ! Q20000
0120 32 20 30 34 21 20 30 34 30 30 30 32 30 20 20 20 2 04! 0400020
0130 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0140 20 20 21 20 43 30 30 30 30 32 36 20 34 34 34 34 ! C000026 4444
0150 20 30 30 31 20 20 20 20 20 20 20 20 20 20 30 20 001 0
0160 20 31 20 30 20 20 1 0

how you can found the message length?
can you tell me ?, please.

I need use another channel for the host response or change the channel?

Thanks in advance!

--- In jpos-dev <at> yahoogroups.com, Mark Salter <marksalter <at> ...> wrote:

>
> Erick Rojas wrote:
> > yes , sorry Mark , the length is 999
> 8)
> >
> >
> > the trace is
> >
>
> > --- header ---
> > 0000 49 53 4F 30 32 34 30 30 30 30 37 37
> > ISO024000077
> >
> > --- data ---
> > 0000 30 32 31 30 33 32 33 41 38 34 38 30 32 45 38 31 >
0210323A84802E81
> > 0010 38 30 30 32 30 30 30 30 30 30 30 30 30 30 30 30 >
8002000000000000
> > 0020 30 30 30 30 34 34 31 32 30 35 31 39 31 38 33 34 >
0000441205191834
> > 0030 30 30 30 30 39 32 31 33 31 38 33 34 31 32 30 35 >
0000921318341205
> > 0040 31 32 30 34 31 32 30 34 39 30 38 30 30 33 37 34 >
1204120490800374
> > 0050 31 35 32 33 31 30 39 33 37 36 38 30 35 37 38 3D >
152310937680578=
> > 0060 31 30 30 37 31 32 36 30 30 30 30 30 38 36 33 30 >
1007126000008630
> > 0070 30 30 30 30 20 20 20 20 20 20 20 20 20 20 20 20 > 0000

> > 0080 32 30 35 34 34 30 30 30 30 30 30 30 30 30 30 31 >
2054400000000001
> > 0090 20 20 20 20 20 20 20 20 30 32 37 32 30 38 32 32 > 02720822
> > 00a0 30 34 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > 04
>
> Field 63 starts here? |
> |
> > 00b0 20 20 20 20 20 20 34 38 34 31 30 32 26 20 30 30
484102& 00
> > 00c0 30 30 35 30 30 31 30 32 21 20 51 31 30 30 30 30 00500102!
Q10000
> > 00d0 32 20 39 20 21 20 51 32 30 30 30 30 32 20 30 34 2 9 !
Q200002 > 04
> > 00e0 21 20 30 34 30 30 30 32 30 20 20 20 20 20 20 20 ! 0400020

> > 00f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 21 20 !
> > 0100 43 30 30 30 30 32 36 20 37 39 38 20 20 30 30 31 C000026
798 001
> > 0110 20 20 20 20 20 20 20 20 20 20 30 20 20 31 20 30
0 1 0
> > 0120 20
> >
> Length of 102 is one byte too many?
>
> So the unpack is trying to go off the end of the available message. In
> your request there are two blanks at the end of field 63, I guess the
> host is not echoing the whole field, it is dropping the last space byte
> and not adjusting the length.
>
> Perhaps the channel is stripping this last byte of field 63 *because*
> the host is not sending the ETX?
>
> > Can you explain how works Base24TCPChannel in the response ?, because
> > the host don´t send a etx, only the message lenght.
> The length is enough to work with, the ETX will be needed *if* the
> channel expects it. I guess (again) that the ETX is being stripped off
> in the Channel.
>
> --
> Mark
>

__._,_.___
Recent Activity
Visit Your Group
SPONSORED LINKS
Search Ads

Get new customers.

List your web site

in Yahoo! Search.

Y! Toolbar

Get it Free!

easy 1-click access

to your groups.

Yahoo! Groups

Start a group

in 3 easy steps.

Connect with others.

.

__,_._,___
Mark Salter | 6 Dec 2006 22:24

Re: Re: Error on BASE24TCPChannel

Erick Rojas wrote:

> no, the field 63 starts from
yes, see below...
>
> 102& 00
> 00c0 30 30 35 30 30 31 30 32 21 20 51 31 30 30 30 30 00500102! Q10000
> 00d0 32 20 39 20 21 20 51 32 30 30 30 30 32 20 30 34 2 9 ! Q200002 04
> 00e0 21 20 30 34 30 30 30 32 30 20 20 20 20 20 20 20 ! 0400020
> 00f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 21 20 !
> 0100 43 30 30 30 30 32 36 20 37 39 38 20 20 30 30 31 C000026 798 001
> 0110 20 20 20 20 20 20 20 20 20 20 30 20 20 31 20 30 0 1 0
> 0120 20
We are agreeing, I pointed to the hex values, you have started with the
ascii representation. Ascii length c'102' = x'313032'.

>
>
> with the sniffer i found that the host don´t send me a ETX, but i
> in the request send the ETX.
>
> 0000 00 00 01 00 00 00 c0 7e 20 00 01 00 08 00 45 00 .......~ .....E.
> 0010 01 58 9c 0a 00 00 3e 06 6e 5e 80 24 28 0b be 0a .X....>.n^.$(...
> 0020 0a fe 1d 44 12 4b 30 3e 9a 09 e7 37 09 ae 50 18 ...D.K0>...7..P.
> 0030 2c cc 0f 2c 00 00 01 2e 49 53 4f 30 32 34 30 30 ,..,....ISO02400
> 0040 30 30 37 37 30 32 31 30 33 32 33 41 38 34 38 30 00770210323A8480
> 0050 32 45 38 31 38 30 30 32 30 30 30 30 30 30 30 30 2E81800200000000
> 0060 30 30 30 30 30 30 30 30 34 34 31 32 30 35 31 38 0000000044120518
> 0070 35 30 30 31 30 30 30 30 38 39 31 32 35 30 30 31 5001000089125001
> 0080 31 32 30 35 31 32 30 34 31 32 30 34 39 30 38 30 1205120412049080
> 0090 30 33 37 34 31 35 32 33 31 30 39 33 37 36 38 30 0374152310937680
> 00a0 35 37 38 3d 31 30 30 37 31 32 36 30 30 30 30 30 578=100712600000
> 00b0 38 36 33 30 30 30 30 30 20 20 20 20 20 20 20 20 86300000
> 00c0 20 20 20 20 30 30 30 30 30 30 31 34 30 30 30 30 000000140000
> 00d0 30 30 30 31 20 20 20 20 20 20 20 20 30 32 37 32 0001 0272
> 00e0 30 38 32 32 30 34 20 20 20 20 20 20 20 20 20 20 082204
> 00f0 20 20 20 20 20 20 20 20 20 20 38 34 30 31 30 32 840102
> 0100 26 20 30 30 30 30 35 30 30 31 30 32 21 20 51 31 & 0000500102! Q1
> 0110 30 30 30 30 32 20 39 20 21 20 51 32 30 30 30 30 00002 9 ! Q20000
> 0120 32 20 30 34 21 20 30 34 30 30 30 32 30 20 20 20 2 04! 0400020
> 0130 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
> 0140 20 20 21 20 43 30 30 30 30 32 36 20 34 34 34 34 ! C000026 4444
> 0150 20 30 30 31 20 20 20 20 20 20 20 20 20 20 30 20 001 0
> 0160 20 31 20 30 20 20 1 0

So your field 63 (ending in x'2020' or c' ')is echoed back, but the ETX
is missing.

In your previous post you included the text :-

<got-message-trailler>
20
</got-message-trailler>

What code writes this log entry, is it your Channel?
It seems to be taking this character space (c' ' = x'20') as the
'trailler' (which I read ETX) thus truncating the response message, and
causing the Exception as field 63 now only has 101 bytes available,
instead of the 102 it's length structure indicates.

This code should perhaps check the 'trailler' is the expected byte value
and reject the message as invalid rather than try to parse it.
Alternatively because the message does not end in an ETX, treat it as
having no 'trailler'.

>
> how you can found the message length?
The message length will be specified just before the start of the
message and is probably stripped from this dump.

> I need use another channel for the host response or change the channel?
You have two choices...

1. Amend the channel to treat the ETX as optional, only stripping off
the ETX if it is really present.

2. Ask the responder to conform to the message specification and add the
expected ETX.

--
Mark

__._,_.___
Recent Activity
Visit Your Group
SPONSORED LINKS
New business?

Get new customers.

List your web site

in Yahoo! Search.

Y! Toolbar

Get it Free!

easy 1-click access

to your groups.

Yahoo! Groups

Start a group

in 3 easy steps.

Connect with others.

.

__,_._,___
Erick Rojas | 6 Dec 2006 22:50
Picon
Favicon

Re: Error on BASE24TCPChannel

Thank you very much Mark, yes are right, because
i have in another message

[java] <got-message-trailler>
[java] 34
[java] </got-message-trailler>
[java] </log>
[java] error unpacking field 49

and the channel trunk the message remove the final ascii character 4
, do you know if i can modify the BASE24TCPChannel? ,or how i can
add (for example to the NACCChannel)the ETX?

Thanks again Mark!.

Have a nice week!

--- In jpos-dev <at> yahoogroups.com, Mark Salter <marksalter <at> ...> wrote:
>
> Erick Rojas wrote:
>
> > no, the field 63 starts from
> yes, see below...
> >
> > 102& 00
> > 00c0 30 30 35 30 30 31 30 32 21 20 51 31 30 30 30 30 00500102!
Q10000
> > 00d0 32 20 39 20 21 20 51 32 30 30 30 30 32 20 30 34 2 9 !
Q200002 04
> > 00e0 21 20 30 34 30 30 30 32 30 20 20 20 20 20 20 20 ! 0400020

> > 00f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 21 20
!
> > 0100 43 30 30 30 30 32 36 20 37 39 38 20 20 30 30 31 C000026
798 001
> > 0110 20 20 20 20 20 20 20 20 20 20 30 20 20 31 20 30
0 1 0
> > 0120 20
> We are agreeing, I pointed to the hex values, you have started with the
> ascii representation. Ascii length c'102' = x'313032'.
>
> >
> >
> > with the sniffer i found that the host don´t send me a ETX, but i
> > in the request send the ETX.
> >
> > 0000 00 00 01 00 00 00 c0 7e 20 00 01 00 08 00 45 00 .......~
.....E.
> > 0010 01 58 9c 0a 00 00 3e 06 6e 5e 80 24 28 0b be 0a
.X....>.n^.$(...
> > 0020 0a fe 1d 44 12 4b 30 3e 9a 09 e7 37 09 ae 50 18
...D.K0>...7..P.
> > 0030 2c cc 0f 2c 00 00 01 2e 49 53 4f 30 32 34 30 30
,..,....ISO02400
> > 0040 30 30 37 37 30 32 31 30 33 32 33 41 38 34 38 30
00770210323A8480
> > 0050 32 45 38 31 38 30 30 32 30 30 30 30 30 30 30 30
2E81800200000000
> > 0060 30 30 30 30 30 30 30 30 34 34 31 32 30 35 31 38
0000000044120518
> > 0070 35 30 30 31 30 30 30 30 38 39 31 32 35 30 30 31
5001000089125001
> > 0080 31 32 30 35 31 32 30 34 31 32 30 34 39 30 38 30
1205120412049080
> > 0090 30 33 37 34 31 35 32 33 31 30 39 33 37 36 38 30
0374152310937680
> > 00a0 35 37 38 3d 31 30 30 37 31 32 36 30 30 30 30 30
578=100712600000
> > 00b0 38 36 33 30 30 30 30 30 20 20 20 20 20 20 20 20 86300000

> > 00c0 20 20 20 20 30 30 30 30 30 30 31 34 30 30 30 30
000000140000
> > 00d0 30 30 30 31 20 20 20 20 20 20 20 20 30 32 37 32 0001
0272
> > 00e0 30 38 32 32 30 34 20 20 20 20 20 20 20 20 20 20 082204

> > 00f0 20 20 20 20 20 20 20 20 20 20 38 34 30 31 30 32
840102
> > 0100 26 20 30 30 30 30 35 30 30 31 30 32 21 20 51 31 &
0000500102! Q1
> > 0110 30 30 30 30 32 20 39 20 21 20 51 32 30 30 30 30 00002 9 !
Q20000
> > 0120 32 20 30 34 21 20 30 34 30 30 30 32 30 20 20 20 2 04!
0400020
> > 0130 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20

> > 0140 20 20 21 20 43 30 30 30 30 32 36 20 34 34 34 34 !
C000026 4444
> > 0150 20 30 30 31 20 20 20 20 20 20 20 20 20 20 30 20 001
0
> > 0160 20 31 20 30 20 20 1 0
>
> So your field 63 (ending in x'2020' or c' ')is echoed back, but the ETX
> is missing.
>
> In your previous post you included the text :-
>
> <got-message-trailler>
> 20
> </got-message-trailler>
>
> What code writes this log entry, is it your Channel?
> It seems to be taking this character space (c' ' = x'20') as the
> 'trailler' (which I read ETX) thus truncating the response message, and
> causing the Exception as field 63 now only has 101 bytes available,
> instead of the 102 it's length structure indicates.
>
> This code should perhaps check the 'trailler' is the expected byte value
> and reject the message as invalid rather than try to parse it.
> Alternatively because the message does not end in an ETX, treat it as
> having no 'trailler'.
>
> >
> > how you can found the message length?
> The message length will be specified just before the start of the
> message and is probably stripped from this dump.
>
> > I need use another channel for the host response or change the
channel?
> You have two choices...
>
> 1. Amend the channel to treat the ETX as optional, only stripping off
> the ETX if it is really present.
>
> 2. Ask the responder to conform to the message specification and add the
> expected ETX.
>
> --
> Mark
>

__._,_.___
Recent Activity
Visit Your Group
SPONSORED LINKS
Search Ads

Get new customers.

List your web site

in Yahoo! Search.

Y! Toolbar

Get it Free!

easy 1-click access

to your groups.

Yahoo! Groups

Start a group

in 3 easy steps.

Connect with others.

.

__,_._,___
Mark Salter | 6 Dec 2006 23:16

Re: Re: Error on BASE24TCPChannel

Erick Rojas wrote:
> Thank you very much Mark, yes are right, because
> i have in another message
>
> [java] <got-message-trailler>
> [java] 34
> [java] </got-message-trailler>
> [java] </log>
> [java] error unpacking field 49
>
> and the channel trunk the message remove the final ascii character 4
> , do you know if i can modify the BASE24TCPChannel? ,or how i can
> add (for example to the NACCChannel)the ETX?

Modifying the code is of course a possibility, however I would first
ask the owner of the system that is responding *without* the expected
ETX to add it. This way both ends of the conversation will agree and
all is well.

I don't like code that absorbs bytes that it is treating as (for
example) an ETX without actually checking that the byte absorbed is an
acceptable ETX value.

If the ETX is truly optional (it appears not) and you want to allow your
responder to get away without supplying the ETX, then :-

Extend BASE24TCPChannel and drop the 'trailler' processing from it's
getMessageLength() *and* getMessageTrailler() methods. This way your
sent message will have the ETX (the responder is coping with them
already), but the received messages will not.

I think it much better to stick to the message specification and *make*
the responder build a correctly structured message. I would also change
the getMessageTrailler() method to check that the byte it absorbs as the
ETX really is an ETX (x'03') and throw an Exception if it is not correct.

If you leave the send/get ETX processing unbalanced you are setting
yourself up for a fall later! If a well meaning programmer at the
responders site suddenly realises that they should have been sending the
ETX all along and simply corrects their code.

One other option is to drop the ETX processing from both sides of this
message exchange, it seems unnecessary and is causing you grief. An
agreement between both systems is the important aspect.

>
>
>
> Thanks again Mark!.
>
> Have a nice week!
>
>
>
>
>
>
> --- In jpos-dev <at> yahoogroups.com, Mark Salter <marksalter <at> ...> wrote:
>> Erick Rojas wrote:
>>
>>> no, the field 63 starts from
>> yes, see below...
>>> 102& 00
>>> 00c0 30 30 35 30 30 31 30 32 21 20 51 31 30 30 30 30 00500102!
> Q10000
>>> 00d0 32 20 39 20 21 20 51 32 30 30 30 30 32 20 30 34 2 9 !
> Q200002 04
>>> 00e0 21 20 30 34 30 30 30 32 30 20 20 20 20 20 20 20 ! 0400020
>
>>> 00f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 21 20
> !
>>> 0100 43 30 30 30 30 32 36 20 37 39 38 20 20 30 30 31 C000026
> 798 001
>>> 0110 20 20 20 20 20 20 20 20 20 20 30 20 20 31 20 30
> 0 1 0
>>> 0120 20
>> We are agreeing, I pointed to the hex values, you have started with the
>> ascii representation. Ascii length c'102' = x'313032'.
>>
>>>
>>> with the sniffer i found that the host don´t send me a ETX, but i
>>> in the request send the ETX.
>>>
>>> 0000 00 00 01 00 00 00 c0 7e 20 00 01 00 08 00 45 00 .......~
> .....E.
>>> 0010 01 58 9c 0a 00 00 3e 06 6e 5e 80 24 28 0b be 0a
> .X....>.n^.$(...
>>> 0020 0a fe 1d 44 12 4b 30 3e 9a 09 e7 37 09 ae 50 18
> ...D.K0>...7..P.
>>> 0030 2c cc 0f 2c 00 00 01 2e 49 53 4f 30 32 34 30 30
> ,..,....ISO02400
>>> 0040 30 30 37 37 30 32 31 30 33 32 33 41 38 34 38 30
> 00770210323A8480
>>> 0050 32 45 38 31 38 30 30 32 30 30 30 30 30 30 30 30
> 2E81800200000000
>>> 0060 30 30 30 30 30 30 30 30 34 34 31 32 30 35 31 38
> 0000000044120518
>>> 0070 35 30 30 31 30 30 30 30 38 39 31 32 35 30 30 31
> 5001000089125001
>>> 0080 31 32 30 35 31 32 30 34 31 32 30 34 39 30 38 30
> 1205120412049080
>>> 0090 30 33 37 34 31 35 32 33 31 30 39 33 37 36 38 30
> 0374152310937680
>>> 00a0 35 37 38 3d 31 30 30 37 31 32 36 30 30 30 30 30
> 578=100712600000
>>> 00b0 38 36 33 30 30 30 30 30 20 20 20 20 20 20 20 20 86300000
>
>>> 00c0 20 20 20 20 30 30 30 30 30 30 31 34 30 30 30 30
> 000000140000
>>> 00d0 30 30 30 31 20 20 20 20 20 20 20 20 30 32 37 32 0001
> 0272
>>> 00e0 30 38 32 32 30 34 20 20 20 20 20 20 20 20 20 20 082204
>
>>> 00f0 20 20 20 20 20 20 20 20 20 20 38 34 30 31 30 32
> 840102
>>> 0100 26 20 30 30 30 30 35 30 30 31 30 32 21 20 51 31 &
> 0000500102! Q1
>>> 0110 30 30 30 30 32 20 39 20 21 20 51 32 30 30 30 30 00002 9 !
> Q20000
>>> 0120 32 20 30 34 21 20 30 34 30 30 30 32 30 20 20 20 2 04!
> 0400020
>>> 0130 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
>
>>> 0140 20 20 21 20 43 30 30 30 30 32 36 20 34 34 34 34 !
> C000026 4444
>>> 0150 20 30 30 31 20 20 20 20 20 20 20 20 20 20 30 20 001
> 0
>>> 0160 20 31 20 30 20 20 1 0
>> So your field 63 (ending in x'2020' or c' ')is echoed back, but the ETX
>> is missing.
>>
>> In your previous post you included the text :-
>>
>> <got-message-trailler>
>> 20
>> </got-message-trailler>
>>
>> What code writes this log entry, is it your Channel?
>> It seems to be taking this character space (c' ' = x'20') as the
>> 'trailler' (which I read ETX) thus truncating the response message, and
>> causing the Exception as field 63 now only has 101 bytes available,
>> instead of the 102 it's length structure indicates.
>>
>> This code should perhaps check the 'trailler' is the expected byte value
>> and reject the message as invalid rather than try to parse it.
>> Alternatively because the message does not end in an ETX, treat it as
>> having no 'trailler'.
>>
>>> how you can found the message length?
>> The message length will be specified just before the start of the
>> message and is probably stripped from this dump.
>>
>>> I need use another channel for the host response or change the
> channel?
>> You have two choices...
>>
>> 1. Amend the channel to treat the ETX as optional, only stripping off
>> the ETX if it is really present.
>>
>> 2. Ask the responder to conform to the message specification and add the
>> expected ETX.
>>
>> --
>> Mark
>>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>

--
Mark

__._,_.___
Recent Activity
Visit Your Group
SPONSORED LINKS
Search Ads

Get new customers.

List your web site

in Yahoo! Search.

Y! Toolbar

Get it Free!

easy 1-click access

to your groups.

Yahoo! Groups

Start a group

in 3 easy steps.

Connect with others.

.

__,_._,___
kchikomo | 12 Dec 2006 14:40
Picon
Favicon

Q2 and EJBs

Hello,

What is the point of Q2 other than supporting dynamic classloading?
Can one drop the qbeans in an APP server like JBoss, and look them up?
Is it wise to wrap a JPos server into an EJB?

Your help will be grately appreciated

__._,_.___
Recent Activity
Visit Your Group
SPONSORED LINKS
Search Ads

Get new customers.

List your web site

in Yahoo! Search.

Y! Toolbar

Get it Free!

easy 1-click access

to your groups.

Yahoo! Groups

Start a group

in 3 easy steps.

Connect with others.

.

__,_._,___

Gmane