CUTR-at-USF / gtfs-realtime-validator

Java-based tool that validates General Transit Feed Specification (GTFS)-realtime feeds. See https://github.com/MobilityData/gtfs-realtime-validator for the latest!
Other
92 stars 40 forks source link

slf4j version conflict #76

Closed scrudden closed 7 years ago

scrudden commented 7 years ago

Summary:

Get GTFS-Feed (error) with no detailed error message.

Steps to reproduce: Start and use the following inputs.

https://dl.dropboxusercontent.com/u/107527881/final_dt2.zip https://github.com/scrudden/transitime-docker/raw/atlanta_streetcar/final_dt2.zip http://www.dynamictime.org/api/v1/key/f78a2e9a/agency/ASC/command/gtfs-rt/tripUpdates http://www.dynamictime.org/api/v1/key/f78a2e9a/agency/ASC/command/gtfs-rt/vehiclePositions

Expected behavior:

Validate GTFS with and provide error detail of found.

Observed behavior:

Shows status bar for GTFS as red but without a detail of the error.

Other info:

I ran the command line version of the Coveyal GTFS validator and all seems OK with the feed.

The output from the terminal for the gtfs-realtime-validator is as follows.

https://dl.dropboxusercontent.com/u/107527881/final_dt2.zip
GTFS File Downloaded Successfully
URL exists in database
SLF4J: The requested version 1.6.99 by your slf4j binding is not compatible with [1.5.5, 1.5.6]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.
[qtp1676888944-25] INFO org.onebusaway.gtfs.serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.Agency
[qtp1676888944-25] INFO org.onebusaway.gtfs.serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.ShapePoint
[qtp1676888944-25] INFO org.onebusaway.gtfs.serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.Route
[qtp1676888944-25] INFO org.onebusaway.gtfs.serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.Stop
[qtp1676888944-25] INFO org.onebusaway.gtfs.serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.Trip
[qtp1676888944-25] INFO org.onebusaway.gtfs.serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.StopTime
[qtp1676888944-25] INFO org.onebusaway.gtfs.serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.ServiceCalendar
[qtp1676888944-25] INFO org.onebusaway.gtfs.serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.ServiceCalendarDate
[qtp1676888944-25] INFO org.onebusaway.gtfs.serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.FareAttribute
[qtp1676888944-25] INFO org.onebusaway.gtfs.serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.FareRule
[qtp1676888944-25] INFO org.onebusaway.gtfs.serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.Frequency
[qtp1676888944-25] INFO org.onebusaway.gtfs.serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.Pathway
[qtp1676888944-25] INFO org.onebusaway.gtfs.serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.Transfer
[qtp1676888944-25] INFO org.onebusaway.gtfs.serialization.GtfsReader - reading entities: org.onebusaway.gtfs.model.FeedInfo
barbeau commented 7 years ago

Thanks @scrudden, we'll take a look at this.

mohangandhiGH commented 7 years ago

@barbeau I was actually not able to reproduce the error. Could you please try to run the application with the above provided feeds and check whether the error is reproduced at your side?

barbeau commented 7 years ago

@scrudden I can't repro this issue on Windows 7 Enterprise with JDK 1.8.0_121 64 bit. Are you running on Windows or another platform, and what version of Java are you using?

scrudden commented 7 years ago

Windows 8 and jdk1.8.0_121 64 bit. I will try to build and run in a docker container.

scrudden commented 7 years ago

Tried again in a docker container and got the same.

OpenJDK 64-Bit Server VM (build 25.111-b14, mixed mode)

barbeau commented 7 years ago

I'll try again with a clean clone. I wonder if this is related to https://github.com/CUTR-at-USF/gtfs-realtime-validator/issues/78. EDIT - It's not.

barbeau commented 7 years ago

@scrudden In the gtfs-realtime-validator in pom.xml, can you change the version of slf4j to 1.7.5?

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.5</version>
        </dependency>

It looks like version 1.5.5, 1.5.6 is being sucked in by the onebusaway-gtfs and onebusaway-gtfs-realtime-exporter, and for some reason that's overriding the more current version. For some reason that doesn't affect our builds but does affect yours.

We're going to be looking at a few other options as well, but it would be good to know if this fixes the problem for you.

scrudden commented 7 years ago

@barbeau I did this with the same result. It is deployed here so you can see what I am seeing.

http://ec2-35-165-166-10.us-west-2.compute.amazonaws.com:8080

scrudden commented 7 years ago

@barbeau The terminal has this which seems to relate to your previous comment.

log4j:WARN No appenders could be found for logger (org.jboss.logging).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
barbeau commented 7 years ago

Just talked with @scrudden, https://github.com/CUTR-at-USF/gtfs-realtime-validator/pull/79 didn't fix this error, so I'm reopening. @scrudden is going to try and share Docker image to help us reproduce.

barbeau commented 7 years ago

After looking at this more, it appears that we don't have slf4j logging set up correctly within Jetty or our project. In the current master branch we're importing the dependencies for slf4j in pom.xml but then never using them in the project (all logging in our code in this project is just done via System.out.println()).

Here's an example of slf4j set up properly with Jetty: https://github.com/jetty-project/embedded-jetty-logging-examples/tree/master/slf4j-logging

A related SO post that I thought was helpful in understanding this: http://stackoverflow.com/questions/15474476/how-to-configure-jetty-to-put-logs-into-an-external-file

I'm going to open a PR shortly that overhauls some of the logging and will hopefully fix this issue.

barbeau commented 7 years ago

PR opened at https://github.com/CUTR-at-USF/gtfs-realtime-validator/pull/81.