afimb / chouette

chouette is a Java program for validating and exchanging Public Transport datas. Comes with a ruby web app : https://github.com/afimb/chouette2
http://www.chouette.mobi
Other
23 stars 22 forks source link

NullPointerException on GTFS export #13

Closed frodrigo closed 8 years ago

frodrigo commented 8 years ago

When converting Neptunefile to GTSF I get an NullPointerException In log:

2015-12-31 15:23:09,360 INFO  NeptuneParserCommand  - ^[[1;35mJAMon Label=NeptuneParserCommand, Units=ms.: (LastValue=22.0, Hits=122.0, Avg=65.02459016393442, Total=7933.0, Min=3.0, Max=578.0, Active=0.0, Avg Active=1.0, Max Active=1.0, First Access=Thu Dec 31 15:22:45 CET
2015-12-31 15:23:09,361 INFO  NeptuneImportExtensionsCommand  - ^[[1;35mJAMon Label=NeptuneImportExtensionsCommand, Units=ms.: (LastValue=0.0, Hits=122.0, Avg=0.10655737704918032, Total=13.0, Min=0.0, Max=1.0, Active=0.0, Avg Active=1.0, Max Active=1.0, First Access=Thu Dec
2015-12-31 15:23:09,364 INFO  NeptuneValidationCommand  - ^[[1;35mJAMon Label=NeptuneValidationCommand, Units=ms.: (LastValue=3.0, Hits=122.0, Avg=11.327868852459016, Total=1382.0, Min=0.0, Max=73.0, Active=0.0, Avg Active=1.0, Max Active=1.0, First Access=Thu Dec 31 15:22:
2015-12-31 15:23:09,364 INFO  NeptuneSetDefaultValuesCommand  - ^[[1;35mJAMon Label=NeptuneSetDefaultValuesCommand, Units=ms.: (LastValue=0.0, Hits=122.0, Avg=0.48360655737704916, Total=59.0, Min=0.0, Max=15.0, Active=0.0, Avg Active=1.0, Max Active=1.0, First Access=Thu De
2015-12-31 15:23:09,367 INFO  GtfsLineProducerCommand  - ^[[1;35mJAMon Label=GtfsLineProducerCommand, Units=ms.: (LastValue=3.0, Hits=122.0, Avg=11.721311475409836, Total=1430.0, Min=0.0, Max=167.0, Active=0.0, Avg Active=1.0, Max Active=1.0, First Access=Thu Dec 31 15:22:4
2015-12-31 15:23:09,368 ERROR GtfsExporterProcessingCommands  - java.lang.NullPointerException
java.lang.NullPointerException
at mobi.chouette.exchange.gtfs.exporter.GtfsExporterProcessingCommands.getPostProcessingCommands(GtfsExporterProcessingCommands.java:74)
at mobi.chouette.command.CommandManager.process(CommandManager.java:227)
at mobi.chouette.command.Main.main(Main.java:13)

On console:

sh chouette.sh -i input.json -o output.json -f RTM.gtfs.zip RTM.zip 
java.lang.RuntimeException: unable to call factories
    at mobi.chouette.exchange.gtfs.exporter.GtfsExporterProcessingCommands.getPostProcessingCommands(GtfsExporterProcessingCommands.java:83)
    at mobi.chouette.command.CommandManager.process(CommandManager.java:227)
    at mobi.chouette.command.Main.main(Main.java:13)

In getting this issue on converting this file: http://www.lepilote.com/FTP/OpenData/RTM.zip

metienne commented 8 years ago

Hello, can you tell me on which tag or branch you found this bug? Please give also the content of input.json and output.json files

Best regards

metienne commented 8 years ago

it is possible that in your output.json, the parameter 'references_type' is missing (set its value to 'line') we will add a better check for this mandatory parameter in next release (3.2.0)

frodrigo commented 8 years ago

Thank you, the fix works for me.