Bike rental not working

65 views
Skip to first unread message

Juris Evertovskis

unread,
Jul 15, 2020, 5:43:45 AM7/15/20
to OpenTripPlanner Users
A while ago bike rental stopped working on my instance of OTP. I am getting lots of the following error in my log and I suspect it might be related to the issue.

12:31:07.207 ERROR (PollingGraphUpdater.java:57) Error while running polling updater of type bike-rental
java
.lang.NumberFormatException: null
        at java
.lang.Integer.parseInt(Integer.java:542) ~[na:1.8.0_252]
        at java
.lang.Integer.parseInt(Integer.java:615) ~[na:1.8.0_252]
        at org
.opentripplanner.updater.bike_rental.NextBikeRentalDataSource.makeStation(NextBikeRentalDataSource.java:47) ~[otp.jar:1.1]
        at org
.opentripplanner.updater.bike_rental.GenericXmlBikeRentalDataSource$1.build(GenericXmlBikeRentalDataSource.java:36) ~[otp.jar:1.1]
        at org
.opentripplanner.updater.bike_rental.GenericXmlBikeRentalDataSource$1.build(GenericXmlBikeRentalDataSource.java:30) ~[otp.jar:1.1]
        at org
.opentripplanner.util.xml.XmlDataListDownloader.parseXML(XmlDataListDownloader.java:144) ~[otp.jar:1.1]
        at org
.opentripplanner.util.xml.XmlDataListDownloader.download(XmlDataListDownloader.java:87) ~[otp.jar:1.1]
        at org
.opentripplanner.updater.bike_rental.GenericXmlBikeRentalDataSource.update(GenericXmlBikeRentalDataSource.java:43) ~[otp.jar:1.1]
        at org
.opentripplanner.updater.bike_rental.BikeRentalUpdater.runPolling(BikeRentalUpdater.java:130) ~[otp.jar:1.1]
        at org
.opentripplanner.updater.PollingGraphUpdater.run(PollingGraphUpdater.java:47) ~[otp.jar:1.1]
        at org
.opentripplanner.updater.GraphUpdaterManager.lambda$startUpdaters$1(GraphUpdaterManager.java:162) [otp.jar:1.1]
        at java
.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_252]
        at java
.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_252]
        at java
.lang.Thread.run(Thread.java:748) ~[na:1.8.0_252]

Does this appear to be an issue with my deployment of OTP? Or the API? The API that I am using is this: https://nextbike.net/maps/nextbike-live.xml?domains=lv

Juris Evertovskis

unread,
Jul 15, 2020, 5:49:16 AM7/15/20
to OpenTripPlanner Users
Sorry about the double bouncing, but I failed to add a couple of things that might be relevant. The station list (/otp/routers/default/bike_rental) on my OTP instance is empty:

<BikeRentalStationList>
<stations/>
</BikeRentalStationList>

My router config is this:

{
       
"timeouts": [5,4,3,1],
       
"updaters": [
               
{
                       
"type": "bike-rental",
                       
"frequencySec": 60,
                       
"sourceType": "next-bike",
                       
"url": "https://nextbike.net/maps/nextbike-live.xml?domains=lv"
               
}
       
]
}

Holger Bruch

unread,
Jul 17, 2020, 10:47:11 AM7/17/20
to OpenTripPlanner Users
Hi Juris,

your list of stations is empty, as OTP is not able to parse the next bike feed and hence can not extract the stations information. The parser of the otp-1.1 version you seem to be using expects each place node to have a bike_racks attribute. This is (at least for the current feed) not the case anymore, why you get the NumberFormatException when trying to parse a not given (null) value.

The current implementation evaluates the attribute free_racks and only if this is not present bike_racks. So I expect you will get better results with a current otp version.

Best regards,
Holger

Juris Evertovskis

unread,
Jul 17, 2020, 2:36:28 PM7/17/20
to OpenTripPlanner Users
Thanks for the insight, Holger!

Does that bracketed [otp.jar:1.1] indicate that I am running OTP 1.1? I did not do the intial deployment, but I was under impression that I have OTP 1.4 there, because that what the version check was returning:

java -jar otp.jar --version
version: 1.4.0
major: 1
minor: 4
patch: 0
qualifier:
commit: b272f14007c97d769216e9ebab65baad7410cdf5


Has it somehow gone wrong?

Also, if it's not hard to explain, could you tell how you understood which field causes the issue?

Tomáš Skála

unread,
Dec 18, 2020, 6:22:26 PM12/18/20
to OpenTripPlanner Users
Try to use GBFS format also available on NextBike API: https://api.nextbike.net/maps/gbfs/v1/nextbike_lv/gbfs.json

Dne pátek 17. července 2020 v 20:36:28 UTC+2 uživatel ju...@glaive.pro napsal:
Reply all
Reply to author
Forward
0 new messages