TestCase Issue (fail to test SGTIN)

Skip to first unread message

Chungkwon Ryu

Nov 28, 2015, 8:10:30 AM11/28/15
to fosstrak
Hello, I want to use your TDTEngine.java, so I am testing the code.

But, When I tried to run testPage13Staged() in TestCaseSgtin.java, I got error at final stage like below :
GS1CHECKSUM Rule result: checkdigit = 4
Finished processing 'FORMAT' rules
Building final grammar
Field to be checked: gtin = null
Decimal minimum = 0
Exception in thread "main" java.lang.NullPointerException
at java.math.BigInteger.<init>(Unknown Source)
at java.math.BigInteger.<init>(Unknown Source)
at org.fosstrak.tdt.TDTEngine.convertLevel(TDTEngine.java:1388)
at org.fosstrak.tdt.TDTEngine.convert(TDTEngine.java:847)
at translation.Translate.testPage13Staged(Translate.java:104)
at translation.Translate.main(Translate.java:46)

I think this error occurs because field named 'gtin' is empty ( gtin = null  in Hash).

Why there is no gtin in Hash? (Any others are in the Hash, for example, itemref, filter, gs1companyprefix, taglength, serial. )

Thanks in advance. 
Reply all
Reply to author
0 new messages