Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[receive] org.jpos.iso.IF_CHAR: Problem unpacking field 37 in jmeter-iso8583 #23

Closed
wayne5168 opened this issue Jun 19, 2020 · 10 comments
Closed
Labels
question Question on usage but not an actual issue

Comments

@wayne5168
Copy link

Hi,
I met a unpacking failure issue:
[receive] org.jpos.iso.IF_CHAR: Problem unpacking field 37 (java.lang.StringIndexOutOfBoundsException: String index out of range: 73) unpacking field=37
I study much jmeter-iso8583 related information but still cannot solve this issue.
If I add field 37 into the request and receive it in the response, then the Exception will show problem unpacking field 55.

Jmeter_log.txt
ws-log.txt

image
image

Please advise.
Thank you very much.

@tilln
Copy link
Owner

tilln commented Jun 19, 2020

Can you please double check the content of the attached Jmeter_log.txt?

@wayne5168
Copy link
Author

Sorry, I attached wrong one, which is downloaded from other issue.
Here you are.
jmeter.log

@tilln
Copy link
Owner

tilln commented Jun 19, 2020

Can you double check your bitmap has the correct class in the packager?

@wayne5168
Copy link
Author

Here is the Packager Configuration file "D:/UTILS/apache-jmeter-5.3/extras/base24.xml".
base24.zip
It uses IFA_BITMAP, ASCII bitmap that is what we use.
The bitmap in the request is built according this packager and the response bitmap with additional bit 39 only as shown in ws-log.txt I attached.
request bitmap:82200000000000000400000000000000
response bitmap:82200000020000000400000000000000
Please advise.

@tilln
Copy link
Owner

tilln commented Jun 20, 2020

It appears that the packager tries to unpack the data inclusive of the message header, i.e.

new org.jpos.iso.ISOMsg().with {
    setPackager(new org.jpos.iso.packager.GenericPackager('c:/temp/base24.xml'))
    unpack(org.jpos.iso.ISOUtil.hex2byte('49534F303035303030303636303831303832323030303030303230303030303030343030303030303030303030303030303631393036333034373437323837353030333031'))
    dump(System.out, '')
}

This reproduces the error you get in the JMeter log.

You may want to try specifying the header length in the packager:

<!-- BASE24 field descriptions for GenericPackager -->
<isopackager headerLength="12">

@tilln tilln added the question Question on usage but not an actual issue label Jun 20, 2020
@wayne5168
Copy link
Author

Thanks, I find the header shall not be configured in Message header, it shall be on Channel header instead, and this headerLength is not required.

@tilln
Copy link
Owner

tilln commented Jun 22, 2020

@wayne5168 would you mind sharing how you configured the Channel for others we come across this issue?
Thanks!

@wayne5168
Copy link
Author

I put the message header value "ISO005000060" in Channel Header.
The request and response will be as following, it can be accepted by jmeter.
ISO0050000600800822000000000000004000000000000000623095337012624301
ISO005000066081082200000020000000400000000000000062301534701262400301
image

If I put the "ISO005000060" with hex "49534F303035303030303630" in Message Header (hex) with headerLength="12" or any other value, the request will repeat the header in the request as
ISO005000060ISO0050000600800822000000000000004000000000000000623102257685856301.

Put the header in Channel Header is what my solution to solve this issue.

By the way, since the Channel Header can only put ASCII string, if I want to put binary in the header then this solution seems don't work. I am studying the document to find out the possible solution.
I appreciate if you can show me some guide or tips.
Thank you very much.

@tilln
Copy link
Owner

tilln commented Jun 23, 2020

Thanks, @wayne5168 for posting this.

Re binary values in the Channel header:
The jPOS API only supports string values, so perhaps you could try embedding non-ASCII characters with the JMeter function __char.

@mdzeyaullah
Copy link

@wayne5168 - can we talk on this issue as we are getting challenges in iso 8583 echo message implementation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question on usage but not an actual issue
Projects
None yet
Development

No branches or pull requests

3 participants