Closed RamakriJaya closed 8 years ago
Hi Jayabalambik, use MessageGeneratorApp.java and run as Junit test to generate PNR and APIS files.Make sure you create PNR folder under c://PNR. This is a java unit test class available in gtas-loader test folder.
Thank you, Srinivasarao Vempati.
Capital Infotech Inc.
41969 Ural Dr.
STONE RIDGE.
VA-20105. Ph:703-340-0906.
On Wed, Sep 14, 2016 at 11:57 AM, RamakriJaya notifications@github.com wrote:
Hi
This is a query regarding the sample data in apimessages files. We are creating sample data for our application which is customer table. I have taken the airline2.edi and modified slightly for our Customer entity. But after loader runs , I get an exception 2016-09-14 20:45:13.701 ERROR [main] --- gov.gtas.services.ApisMessageService : gov.gtas.parsers.exception.ParseException: Expected segment CNT but got ATT at gov.gtas.parsers.edifact.EdifactParser.getNextSegment( EdifactParser.java:169) at gov.gtas.parsers.edifact.EdifactParser.getMandatorySegment( EdifactParser.java:135) at gov.gtas.parsers.edifact.EdifactParser.getMandatorySegment( EdifactParser.java:126) at gov.gtas.parsers.paxlst.PaxlstParserUNedifact.parsePayload( PaxlstParserUNedifact.java:91) at gov.gtas.parsers.edifact.EdifactParser.parse(EdifactParser.java:83) at gov.gtas.services.ApisMessageService.parse(ApisMessageService.java:62) at gov.gtas.services.Loader.processMessage(Loader.java:82) at gov.gtas.services.LoaderMain.processSingleFile(LoaderMain.java:162) at gov.gtas.services.LoaderMain.processListOfFiles(LoaderMain.java:90) at gov.gtas.services.LoaderMain.main(LoaderMain.java:70)
Attaching the edi file which I created here. My question is has that got to do anything wrt to order of the segments in the data file. If yes could you please let me know what is the expected order . Or is there anything else I need to check wrt creating the data
Also I tried to use the apisgen.py to generate data .I am faced with an error import name not defined. I am using interpreter version 2.7.12
Please help.Many thanks in advance
Regards Jayabalambika.R customer.zip https://github.com/US-CBP/GTAS/files/472617/customer.zip
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/US-CBP/GTAS/issues/62, or mute the thread https://github.com/notifications/unsubscribe-auth/AFfcXH8BF9L7IY75JbIOweV-yLzFYTXCks5qqBmCgaJpZM4J88Ob .
Also once you generate the edi files create a folder named OLD in PNR folder load the same to database using
java -jar C:\NewGtas\GTAS\gtas-parent\gtas-loader\target\gtas-loader.jar C:\PNR\ C:\PNR\OLD\
_the _C:\NewGtas\GTAS need to be replaced with your physical directory structure.
Thank you, Srinivasarao Vempati.
Capital Infotech Inc.
41969 Ural Dr.
STONE RIDGE.
VA-20105. Ph:703-340-0906.
On Wed, Sep 14, 2016 at 12:12 PM, Srinivas Vempati vempati.svr@gmail.com wrote:
Hi Jayabalambik, use MessageGeneratorApp.java and run as Junit test to generate PNR and APIS files.Make sure you create PNR folder under c://PNR. This is a java unit test class available in gtas-loader test folder.
Thank you, Srinivasarao Vempati.
Capital Infotech Inc.
41969 Ural Dr.
STONE RIDGE.
VA-20105. Ph:703-340-0906 <703-340-0906>.
On Wed, Sep 14, 2016 at 11:57 AM, RamakriJaya notifications@github.com wrote:
Hi
This is a query regarding the sample data in apimessages files. We are creating sample data for our application which is customer table. I have taken the airline2.edi and modified slightly for our Customer entity. But after loader runs , I get an exception 2016-09-14 20:45:13.701 ERROR [main] --- gov.gtas.services.ApisMessageService : gov.gtas.parsers.exception.ParseException: Expected segment CNT but got ATT at gov.gtas.parsers.edifact.EdifactParser.getNextSegment(Edifac tParser.java:169) at gov.gtas.parsers.edifact.EdifactParser.getMandatorySegment(E difactParser.java:135) at gov.gtas.parsers.edifact.EdifactParser.getMandatorySegment(E difactParser.java:126) at gov.gtas.parsers.paxlst.PaxlstParserUNedifact.parsePayload(P axlstParserUNedifact.java:91) at gov.gtas.parsers.edifact.EdifactParser.parse(EdifactParser.java:83) at gov.gtas.services.ApisMessageService.parse(ApisMessageService.java:62) at gov.gtas.services.Loader.processMessage(Loader.java:82) at gov.gtas.services.LoaderMain.processSingleFile(LoaderMain.java:162) at gov.gtas.services.LoaderMain.processListOfFiles(LoaderMain.java:90) at gov.gtas.services.LoaderMain.main(LoaderMain.java:70)
Attaching the edi file which I created here. My question is has that got to do anything wrt to order of the segments in the data file. If yes could you please let me know what is the expected order . Or is there anything else I need to check wrt creating the data
Also I tried to use the apisgen.py to generate data .I am faced with an error import name not defined. I am using interpreter version 2.7.12
Please help.Many thanks in advance
Regards Jayabalambika.R customer.zip https://github.com/US-CBP/GTAS/files/472617/customer.zip
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/US-CBP/GTAS/issues/62, or mute the thread https://github.com/notifications/unsubscribe-auth/AFfcXH8BF9L7IY75JbIOweV-yLzFYTXCks5qqBmCgaJpZM4J88Ob .
"My question is has that got to do anything wrt to order of the segments in the data file."
Yes. The order matters.
Please read the APIS/PAXLST specifications:
https://www.cbp.gov/sites/default/files/documents/un_edifact_guide_2.pdf
And as for apisgen.py, please just use the MessageGeneratorApp class mentioned earlier.
Hi
This is a query regarding the sample data in apimessages files. We are creating sample data for our application which is customer table. I have taken the airline2.edi and modified slightly for our Customer entity. But after loader runs , I get an exception 2016-09-14 20:45:13.701 ERROR [main] --- gov.gtas.services.ApisMessageService : gov.gtas.parsers.exception.ParseException: Expected segment CNT but got ATT at gov.gtas.parsers.edifact.EdifactParser.getNextSegment(EdifactParser.java:169) at gov.gtas.parsers.edifact.EdifactParser.getMandatorySegment(EdifactParser.java:135) at gov.gtas.parsers.edifact.EdifactParser.getMandatorySegment(EdifactParser.java:126) at gov.gtas.parsers.paxlst.PaxlstParserUNedifact.parsePayload(PaxlstParserUNedifact.java:91) at gov.gtas.parsers.edifact.EdifactParser.parse(EdifactParser.java:83) at gov.gtas.services.ApisMessageService.parse(ApisMessageService.java:62) at gov.gtas.services.Loader.processMessage(Loader.java:82) at gov.gtas.services.LoaderMain.processSingleFile(LoaderMain.java:162) at gov.gtas.services.LoaderMain.processListOfFiles(LoaderMain.java:90) at gov.gtas.services.LoaderMain.main(LoaderMain.java:70)
Attaching the edi file which I created here. My question is has that got to do anything wrt to order of the segments in the data file. If yes could you please let me know what is the expected order . Or is there anything else I need to check wrt creating the data
Also I tried to use the apisgen.py to generate data .I am faced with an error import name not defined. I am using interpreter version 2.7.12
Please help.Many thanks in advance
Regards Jayabalambika.R customer.zip