CUTR-at-USF / opentripplanner-pojos

Plain Old Java Objects (POJOs) used for deserializing OpenTripPlanner server responses on Android devices.
2 stars 9 forks source link

Changes in the current 0.9.2-SNAPSHOT OTP server project seem to have broken Jackson data binding #3

Closed barbeau closed 11 years ago

barbeau commented 11 years ago
06-24 15:00:13.910: D/OTP(22325): startMaker:45.18857, 9.154958
06-24 15:00:13.910: D/OTP(22325): endMaker:45.188509, 9.144058
06-24 15:00:13.910: D/OTP(22325): Optimize:QUICK
06-24 15:00:13.915: D/OTP(22325): TravelMode:WALK,TRAM,SUBWAY,RAIL,BUS,FERRY,CABLE_CAR,GONDOLA,FUNICULAR,TRANSIT,TRAINISH,BUSISH
06-24 15:00:13.915: D/OTP(22325): tripRequest1
06-24 15:00:13.915: D/OTP(22325): tripRequest4
06-24 15:00:13.955: D/OTP(22325): tripRequest6
06-24 15:00:13.955: D/OTP(22325): tripRequest2
06-24 15:00:13.955: D/OTP(22325): tripRequest5
06-24 15:00:13.955: D/OTP(22325): u:http://192.168.0.134:8081/opentripplanner-api-webapp/ws/plan?optimize=QUICK&showIntermediateStops=true&time=03:00PM&arriveBy=false&wheelchair=false&maxWalkDistance=1600.0&fromPlace=45.18857%2C+9.154958&toPlace=45.188509%2C+9.144058&date=06/24/13&mode=WALK,TRAM,SUBWAY,RAIL,BUS,FERRY,CABLE_CAR,GONDOLA,FUNICULAR,TRANSIT,TRAINISH,BUSISH
06-24 15:00:13.955: D/OTP(22325): tripRequest3
06-24 15:00:13.955: D/OTP(22325): URL2: http://192.168.0.134:8081/opentripplanner-api-webapp/ws/plan?optimize=QUICK&showIntermediateStops=true&time=03:00PM&arriveBy=false&wheelchair=false&maxWalkDistance=1600.0&fromPlace=45.18857%2C+9.154958&toPlace=45.188509%2C+9.144058&date=06/24/13&mode=WALK,TRAM,SUBWAY,RAIL,BUS,FERRY,CABLE_CAR,GONDOLA,FUNICULAR,TRANSIT,TRAINISH,BUSISH
06-24 15:00:13.955: D/OTP(22325): url:http://192.168.0.134:8081/opentripplanner-api-webapp/ws/plan?optimize=QUICK&showIntermediateStops=true&time=03:00PM&arriveBy=false&wheelchair=false&maxWalkDistance=1600.0&fromPlace=45.18857%2C+9.154958&toPlace=45.188509%2C+9.144058&date=06/24/13&mode=WALK,TRAM,SUBWAY,RAIL,BUS,FERRY,CABLE_CAR,GONDOLA,FUNICULAR,TRANSIT,TRAINISH,BUSISH
06-24 15:00:14.415: E/OTP(22325): Error fetching JSON or XML: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "stopIndex" (class org.opentripplanner.v092snapshot.api.model.Place), not marked as ignorable (10 known properties: , "orig", "zoneId", "lon", "name", "stopCode", "geometry", "departure", "arrival", "stopId", "lat"])
06-24 15:00:14.415: E/OTP(22325):  at [Source: libcore.net.http.ChunkedInputStream@42964608; line: 1, column: 514] (through reference chain: org.opentripplanner.v092snapshot.api.ws.Response["plan"]->org.opentripplanner.v092snapshot.api.model.TripPlan["from"]->org.opentripplanner.v092snapshot.api.model.Place["stopIndex"])
06-24 15:00:14.425: D/OTP(22325): response:null
06-24 15:00:14.445: E/OTP(22325): No route to display!
06-24 15:00:29.535: D/OTP(22325): direction1:45.18857, 9.154958
06-24 15:00:29.535: D/OTP(22325): direction2:45.188509, 9.144058
06-24 15:00:29.535: D/OTP(22325): direction3:0
06-24 15:00:29.535: D/OTP(22325): direction4:0
06-24 15:00:29.535: D/OTP(22325): direction5:edu.usf.cutr.opentripplanner.android.model.OTPBundle@426c4578
06-24 15:00:29.535: D/OTP(22325): Menu25

For details see: https://groups.google.com/forum/#!topic/opentripplanner-dev/m4tKSXvfwjQ

barbeau commented 11 years ago

I fixed this in OTP Android in Jackson by ignoring new unknown attributes (https://github.com/CUTR-at-USF/OpenTripPlanner-for-Android/issues/36), which is good enough to fix the problem of broken trip planning. I'm going to close this issue for now without adding anything to the POJOs since its not needed, and if the new attributes from the Place.java class are needed in the app we can open another issue at that time.