ibi-group / datatools-server

Server for IBI's GTFS data management platform.
MIT License
49 stars 51 forks source link

Build error: unreported exception com.conveyal.gtfs.util.InvalidNamespaceException #115

Closed landonreed closed 5 years ago

landonreed commented 5 years ago

Issue by simonsouth Tuesday Jun 26, 2018 at 16:05 GMT Originally opened as https://github.com/catalogueglobal/datatools-server/issues/96


After successfully building the project several times, I ran mvn clean package and the build failed with

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project datatools-server: Compilation failure: Compilation failure:
[ERROR] (...)/src/main/java/com/conveyal/datatools/editor/controllers/api/EditorController.java:[103,39] unreported exception com.conveyal.gtfs.util.InvalidNamespaceException; must be caught or declared to be thrown
[ERROR] (...)/src/main/java/com/conveyal/datatools/editor/controllers/api/EditorController.java:[123,39] unreported exception com.conveyal.gtfs.util.InvalidNamespaceException; must be caught or declared to be thrown
[ERROR] (...)/src/main/java/com/conveyal/datatools/editor/controllers/api/EditorController.java:[154,39] unreported exception com.conveyal.gtfs.util.InvalidNamespaceException; must be caught or declared to be thrown
[ERROR] (...)/src/main/java/com/conveyal/datatools/editor/controllers/api/EditorController.java:[230,39] unreported exception com.conveyal.gtfs.util.InvalidNamespaceException; must be caught or declared to be thrown

Now running mvn package always produces the same result. I'm at a loss as to what has changed---git status shows no modifications.

The lines in question are all pretty much the same and look like

JdbcTableWriter tableWriter = new JdbcTableWriter(table, datasource, namespace);

This is using Ubuntu 16.04.4 (Xenial) within Windows Subsystem for Linux, in case it's relevant.

landonreed commented 5 years ago

Comment by simonsouth Tuesday Jun 26, 2018 at 16:32 GMT


Looks like Conveyal's gtfs-lib has been updated in their Maven repository but not on GitHub. The package's metadata now shows

  <versioning>
    <snapshot>
      <timestamp>20180626.151636</timestamp>
      <buildNumber>28</buildNumber>
    </snapshot>
    <lastUpdated>20180626151636</lastUpdated>

and Maven now reports these additional dependencies for it:

[INFO] |  +- com.github.Zenika:java-snapshot-matcher:jar:7e6ed4049eb637334e56f84bdd23ea74da05f141:compile
[INFO] |  |  +- com.googlecode.java-diff-utils:diffutils:jar:1.3.0:compile
[INFO] |  |  \- org.hamcrest:hamcrest-all:jar:1.3:compile

If I were to diagnose this further, how would I proceed? Does Conveyal publish up-to-date documentation or source code for this library? Or should datatools-server be using the version on GitHub instead?

landonreed commented 5 years ago

Comment by landonreed Tuesday Jun 26, 2018 at 20:24 GMT


@simonsouth thanks for the bug report. We should be cutting a stable release for datatools-server soon. There have been a number of large changes to the application in the past few months. We will release a new version of gtfs-lib, which datatools-server depends on. Currently the dev branch depends on a snapshot version of gtfs-lib, which is why you ran into this bug (the new snapshot caused datatools-server to fail to compile).