Exception in thread "main" org.onebusaway.csv_entities.exceptions.CsvEntityIOException: io error: entityType=org.onebusaway.gtfs.model.Transfer path=transfers.txt lineNumber=2
at org.onebusaway.csv_entities.CsvEntityReader.readEntities(CsvEntityReader.java:161)
at org.onebusaway.csv_entities.CsvEntityReader.readEntities(CsvEntityReader.java:120)
at org.onebusaway.csv_entities.CsvEntityReader.readEntities(CsvEntityReader.java:115)
at org.onebusaway.gtfs.serialization.GtfsReader.run(GtfsReader.java:174)
at org.onebusaway.gtfs.serialization.GtfsReader.run(GtfsReader.java:162)
at edu.usf.cutr.gtfsrtvalidator.lib.batch.BatchProcessor.readGtfsData(BatchProcessor.java:312)
at edu.usf.cutr.gtfsrtvalidator.lib.batch.BatchProcessor.processFeeds(BatchProcessor.java:138)
at edu.usf.cutr.gtfsrtvalidator.lib.Main.main(Main.java:62)
Caused by: org.onebusaway.csv_entities.exceptions.MissingRequiredFieldException: missing required field: transfer_type
at org.onebusaway.csv_entities.schema.AbstractFieldMapping.isMissingAndOptional(AbstractFieldMapping.java:100)
at org.onebusaway.csv_entities.schema.DefaultFieldMapping.translateFromCSVToObject(DefaultFieldMapping.java:43)
at org.onebusaway.csv_entities.IndividualCsvEntityReader.readEntity(IndividualCsvEntityReader.java:131)
at org.onebusaway.csv_entities.IndividualCsvEntityReader.handleLine(IndividualCsvEntityReader.java:98)
at org.onebusaway.csv_entities.CsvEntityReader.readEntities(CsvEntityReader.java:157)
... 7 more
The problem is that while transfers.txt transfer_type is a required field, it is allowed to be empty (i.e., the header must exist, but the value in the rows can be omitted).
Summary:
We're using the oba-gtfs-modules in the gtfs-realtime-validator (see related issue https://github.com/CUTR-at-USF/gtfs-realtime-validator/issues/309).
When trying to load BURT (Burlington, ON, Canada) GTFS data (https://github.com/CUTR-at-USF/gtfs-realtime-validator/files/1458082/gtfs.zip), the modules throw this exception:
The problem is that while transfers.txt transfer_type is a required field, it is allowed to be empty (i.e., the header must exist, but the value in the rows can be omitted).
https://developers.google.com/transit/gtfs/reference/#transferstxt says:
Steps to reproduce:
Load the BURT GTFS data (https://github.com/CUTR-at-USF/gtfs-realtime-validator/files/1458082/gtfs.zip), like:
Expected behavior:
Load the GTFS data without error
Observed behavior:
I get crash with stack trace above
Platform:
Windows 7 Enterprise w/ jdk1.8.0_73 and: