conveyal / gtfs-editor

A web-based GTFS editing framework. THIS PROJECT IS DEPRECATED. See https://github.com/ibi-group/datatools-ui for current version.
https://github.com/ibi-group/datatools-ui
MIT License
134 stars 63 forks source link

UnrecognizedPropertyException when doing anything schedule related #192

Open medwards opened 9 years ago

medwards commented 9 years ago

I get the following exception whenever trying to do anything schedule related.

I've tried (on both manually created patterns and TransitWand imported patterns):

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "name" (class models.transit.Route), not marked as ignorable (17 known properties: "agencyId", "routeLongName", "sunday", "routeColor", "id", "publiclyVisible", "routeShortName", "routeTypeId", "routeUrl", "wheelchairBoarding", "weekday", "gtfsRouteId", "routeTextColor" [truncated]])
 at [Source: {"id":"88da512d-9173-4742-9991-2d1077edb7fa","gtfsRouteId":"ROUTE_88da512d-9173-4742-9991-2d1077edb7fa","routeShortName":"U6","routeLongName":"U6","routeDesc":"","routeTypeId":"c9dffbbd-521a-4dd6-9279-0e76464b9943","routeUrl":"","routeColor":"#7030b0","routeTextColor":"","comments":"","status":"IN_PROGRESS","publiclyVisible":false,"weekday":null,"saturday":null,"sunday":null,"agencyId":"bdceb845-0cf9-40a7-a2cd-71f04bec6aba","wheelchairBoarding":"UNKNOWN","name":"U6 U6"}; line: 1, column: 468] (through reference chain: Route["name"])
    at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:51)
    at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:744)
    at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:915)
    at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1306)
    at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1284)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:243)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:118)
    at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3066)
    at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2161)
    at controllers.api.RouteController.updateRoute(RouteController.java:103)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:557)
    at play.mvc.ActionInvoker.invoke(ActionInvoker.java:508)
    at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:484)
    at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:479)
    at play.mvc.ActionInvoker.invoke(ActionInvoker.java:161)
    at play.server.PlayHandler$NettyInvocation.execute(PlayHandler.java:251)
    at play.Invoker$Invocation.run(Invoker.java:278)
    at play.server.PlayHandler$NettyInvocation.run(PlayHandler.java:229)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
markjd84 commented 9 years ago

+1 for this, but I accidentally created a duplicate issue (#196) which I've now closed.

@medwards , any luck finding a workaround?

medwards commented 9 years ago

Nope, and I'm not sure there is one. I tried most of interactions possible and they all end up failing to save. I was going to dive the code but I don't have so much time atm. Speak up if you figure it out, I wanna make some GTFS! :)

markjd84 commented 9 years ago

There are actually slight differences between our issues: mine comes from TripPatternController.java:120 and references a problem with the field useFrequency. However I guess it is the same problem mapping the user input to the model.

Looking at the code, it might just be that these fields need captured correctly by the model - but I am probably missing something that happens with related functionality.

markjd84 commented 9 years ago

Just to let everyone know, I'm working on a fix for this and possibly #167 ...will share when I have any progress to report!