Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

NullPointerException when loading GTFS data #20

Closed
meanfreepath opened this issue Oct 1, 2015 · 6 comments · Fixed by #23
Closed

NullPointerException when loading GTFS data #20

meanfreepath opened this issue Oct 1, 2015 · 6 comments · Fixed by #23
Labels

Comments

@meanfreepath
Copy link

I'm experiencing a NullPointerException crash when attempting to load the GTFS data at http://developer.onebusaway.org/tmp/sound/gtfs/modified/1_gtfs.zip

I'm running the latest version (commit e845826), built with Maven 3.3.3 using Homebrew on OS X.

The import seems to progress until nearly finished, then crashes. Here's the full output, starting from the beginning:

java -jar gtfs-osm-sync-1.0-SNAPSHOT-jar-with-dependencies.jar

Error reading in default operators: /Users/nick/dev/gtfs-osm-sync/GO_Sync/target/operators.csv (No such file or directory)
Metro Transit
{gtfs_stop_timezone=5, transport:zone=4}
Lon, Lat format = -122.51072900000001,47.185114 -121.781835,47.936364999999995
Initializing...
Connecting http://api.openstreetmap.org/api/0.6/capabilities/ using method GET 1
Response Code: 200
Response Message: OK
End response

Connecting http://overpass-api.de/api/interpreter using method POST 1
Response Code: 200
Response Message: OK
End response
Connecting http://api.openstreetmap.fr/xapi?relation[route=bus][bbox=-122.51072900000001,47.185114,-121.781835,47.936364999999995] using method GET 1
Response Code: 200
Response Message: OK
End response
tags = 1055
Existing Nodes = 1055
New Nodes = 7811
reportkeys 2335reportIDs 0
[Justin R, rambudo, sctrojan79, Paul McCombs, pluton_od, eulochon, dangerouslee, SuzanneH, compdude, stevea, Anthony Bloesch, rgreinho, mfagan, djdune, Ceema, Anton Lavrov, Ethan O'Connor, AlexRu, chalen, kilpatjr, KTyler, Debbie Bull, genegladden, Peaceray, todrobbins, chricycle, WernerP, tkedt, lloyd5, stephbu, rosvicl, jrwats, michael0x2a, zephyr, Drewguy12345, oleksii, BlackCatsOnly, LHT, emorye, marylynne, lukobe, roadgeek99, STBrenden, Omnific, bdp, andrewpmk, NebbyPal, sir-mapalot, Steve, smithmikeg, Skybunny, Robert Whittaker, rubillionaire, Ballard OpenStreetMap, avs5221, naanastoudt, WesM, joelotz, OSMF Redaction Account, duongle215, Berjoh, VictorA, seattlefyi, osmanon31459, >LAND, Ivan Komarov, Casiotone, ulfl, jBellevue, morganvenable, samely, Caesura, Oli-Wan, gonzoramos, ktula, Yehoshua, VeloBusDriver, wilsoncd35, Djido, bibi6, Falcon Darkstar Momot, PCS, Daniel Szwalkiewicz, cohort, wheelmap_visitor, sunshine98103, Natfoot, WecWec, jeffmeyer, Marat Turaev, Glassman, Wim L, tjbenator, goldfndr, GNW312, jtreuting, GITNE, Beau Gunderson, Brian(J), akims, Heptazane, Robert Gash, xStreetKingx, arisphinx]
relation tags = 29
tags = 29
There are 35 in total!
Done...!!
GTFSstops 7811 report7811upload7797modify948delete0
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.ImageIcon.(ImageIcon.java:217)
at edu.usf.cutr.go_sync.gui.ReportViewer.initComponents(ReportViewer.java:1589)
at edu.usf.cutr.go_sync.gui.ReportViewer.(ReportViewer.java:427)
at edu.usf.cutr.go_sync.task.CompareData.generateReport(CompareData.java:812)
at edu.usf.cutr.go_sync.task.CompareData.done(CompareData.java:803)
at javax.swing.SwingWorker$5.run(SwingWorker.java:737)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:832)
at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:842)
at javax.swing.Timer.fireActionPerformed(Timer.java:313)
at javax.swing.Timer$DoPostEvent.run(Timer.java:245)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Let me know if you need any more info.

@barbeau barbeau added the bug label Oct 2, 2015
@barbeau
Copy link
Member

barbeau commented Oct 2, 2015

Thanks for the report! This issue is also mentioned at:
#18 (comment)

This project isn't under active development, so it may be a while until someone looks at this. PR's happily accepted :).

@reubot reubot mentioned this issue Jan 26, 2016
@barbeau
Copy link
Member

barbeau commented Feb 4, 2016

@ingsoc79 Would you be able to try out the new v1.0.0-SNAPSHOT version of GO-Sync, which is avaialble to download on the releases page - https://github.com/CUTR-at-USF/gtfs-osm-sync/releases/tag/v1.0.0-SNAPSHOT?

Hopefully @reubot fixed this issue - it would be great to confirm.

@meanfreepath
Copy link
Author

Just ran it again on the v1.0.0-SNAPSHOT tag on the same dataset as before. It still crashed, but with a different stack trace (I cut out the agency list that appears immediately after execution):

$ java -jar gtfs-osm-sync-1.0-SNAPSHOT.jar
Metro Transit
{gtfs_stop_timezone=5, transport:zone=4}
Lon, Lat format = -122.51072900000001,47.185114      -121.781835,47.936364999999995
Initializing...
Connecting http://api.openstreetmap.org/api/0.6/capabilities/ using method GET 1
Response Code: 200
Response Message: OK
End response
<union><query type='node'><has-kv k='highway' v='bus_stop'/><bbox-query w='-122.51072900000001' e='-121.781835' s='47.185114' n='47.936364999999995'/></query><query type='node'><has-kv k='public_transport' v='platform'/><bbox-query w='-122.51072900000001' e='-121.781835' s='47.185114' n='47.936364999999995'/></query><query type='node'><has-kv k='public_transport' v='station'/><bbox-query w='-122.51072900000001' e='-121.781835' s='47.185114' n='47.936364999999995'/></query><query type='node'><has-kv k='amenity' v='bus_station'/><bbox-query w='-122.51072900000001' e='-121.781835' s='47.185114' n='47.936364999999995'/></query></union><print mode="meta"/>
Connecting http://overpass-api.de/api/interpreter using method POST 1
Response Code: 200
Response Message: OK
End response
Connecting http://api.openstreetmap.fr/xapi?relation[route=bus][bbox=-122.51072900000001,47.185114,-121.781835,47.936364999999995] using method GET 1
Response Code: 200
Response Message: OK
End response
tags = 1159
Existing Nodes = 1159
New Nodes = 7817
reportkeys 2505reportIDs 0
[Justin R, rambudo, sctrojan79, Paul McCombs, pluton_od, eulochon, dangerouslee, SuzanneH, compdude, stevea, Anthony Bloesch, rgreinho, mfagan, djdune, Ceema, Anton Lavrov, Ethan O'Connor, AlexRu, chalen, KTyler, Debbie Bull, genegladden, Peaceray, todrobbins, chricycle, WernerP, tkedt, lloyd5, stephbu, rosvicl, jrwats, michael0x2a, zephyr, Drewguy12345, oleksii, BlackCatsOnly, LHT, emorye, marylynne, lukobe, roadgeek99, STBrenden, Omnific, bdp, andrewpmk, NebbyPal, sir-mapalot, Steve, smithmikeg, Skybunny, Robert Whittaker, rubillionaire, Ballard OpenStreetMap, avs5221, naanastoudt, WesM, joelotz, OSMF Redaction Account, duongle215, Muzzle, Berjoh, VictorA, seattlefyi, osmanon31459, >LAND, Ivan Komarov, ulfl, jBellevue, morganvenable, samely, Caesura, Oli-Wan, gonzoramos, ktula, Yehoshua, VeloBusDriver, wilsoncd35, Djido, bibi6, Falcon Darkstar Momot, PCS, Daniel Szwalkiewicz, cohort, wheelmap_visitor, sunshine98103, Natfoot, WecWec, jeffmeyer, Marat Turaev, Glassman, Wim L, tjbenator, goldfndr, GNW312, jtreuting, GITNE, Beau Gunderson, Brian(J), Heptazane, Robert Gash, xStreetKingx, arisphinx]
relation tags = 36
tags = 36
There are 29 in total!
Done...!!
GTFSstops 7817 report7817upload7804modify1052delete0
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/jdesktop/swingx/mapviewer/WaypointRenderer
    at edu.usf.cutr.go_sync.task.CompareData.generateReport(CompareData.java:812)
    at edu.usf.cutr.go_sync.task.CompareData.done(CompareData.java:803)
    at javax.swing.SwingWorker$5.run(SwingWorker.java:737)
    at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:832)
    at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
    at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:842)
    at javax.swing.Timer.fireActionPerformed(Timer.java:313)
    at javax.swing.Timer$DoPostEvent.run(Timer.java:245)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.ClassNotFoundException: org.jdesktop.swingx.mapviewer.WaypointRenderer
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 22 more

@reubot
Copy link
Contributor

reubot commented Feb 4, 2016

You'll need to run the jar with dependencies. I removed swingx-ws from the classpath as the bundled version (which I removed) was conflicting with the version being pulled from maven.

@meanfreepath
Copy link
Author

Thanks for the heads up – I ran the jar with dependencies using the v1.0.0-SNAPSHOT tag and it crashed again with the following stack trace:

$ java -jar gtfs-osm-sync-1.0-SNAPSHOT-jar-with-dependencies.jar
....
....
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at javax.swing.ImageIcon.<init>(ImageIcon.java:217)
    at edu.usf.cutr.go_sync.gui.ReportViewer.initComponents(ReportViewer.java:1589)
    at edu.usf.cutr.go_sync.gui.ReportViewer.<init>(ReportViewer.java:427)
    at edu.usf.cutr.go_sync.task.CompareData.generateReport(CompareData.java:812)
    at edu.usf.cutr.go_sync.task.CompareData.done(CompareData.java:803)
    at javax.swing.SwingWorker$5.run(SwingWorker.java:737)
    at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:832)
    at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
    at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:842)
    at javax.swing.Timer.fireActionPerformed(Timer.java:313)
    at javax.swing.Timer$DoPostEvent.run(Timer.java:245)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

However, it seems to be working fine when I ran it on master. So whatever changes weren't merged into v1.0.0-SNAPSHOT seem to have done it – nice work!

@barbeau
Copy link
Member

barbeau commented Feb 4, 2016

@ingsoc79 Sorry, confusion is my fault - I deleted and re-created the v1.0.0-SNAPSHOT tag (not sure how SNAPSHOT releases are typically treated on Github?), so you'd need to delete and fetch it to get the latest version (i.e., master).

I just published a v1.0.0 release to fix this - https://github.com/CUTR-at-USF/gtfs-osm-sync/releases/tag/v1.0.0.

Can you please try downloading the gtfs-osm-sync-1.0.0-jar-with-dependencies.jar from that page and seeing if it works?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants