I am implementing ATM Simulator, which accepts ISO8583 msg from client and unpack it using jPOS library.
Error that has occured while unpacking my msg is : "error unpacking field 102: negativearraysizeexception" .
I researched about this error and thought about adding logger to my program so that on printing, i would get the information on which data is going into which field.
Code that i include in my existing java application is as follows :
Logger logger = new Logger();
logger.addListener (new SimpleLogListener(System.out));
((LogSource)p).setLogger(logger, "debug");// p is my ISOPackger
It is giving me compilation error as
1- Constructor Logger() is undefined
2- Method addListener is undefined for type Logger
3- LogSource cannot be resolved to a type
Help me in solving these errors. Any help would be appreciated. Thanks in advance.
Regarding that error "error unpacking field 102: negativearraysizeexception"
I can help because it happened to me.
Check iso87cscascii.xml file in the configuration folder, each field length and type in that file must be identical to the ISO Message you received.
Probably the field number in the error (102) is where that error occurred, please check that field precisely, and also check other fields to guarantee that error will not happen again.
You're probably not importing org.jpos.util.Logger
and picking some other Logger.
jPOS' Logger do have a no args constructor.
See javadocs here: http://jpos.org/doc/javadoc/org/jpos/util/Logger.html#Logger()
Could you post full java class? I guess you added incorrect Jpos libraries
1- Constructor Logger() is undefined
Do you use import org.jpos.util.Logger?
2- Method addListener is undefined for type Logger
Be sure you use exactly jpos library.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With