You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 4, 2022. It is now read-only.
Hi! I was following the quick start guide to setup the api.
First of all, according to the javadoc, getRemainingArrivalTimeText method doesn't exist anymore. Also, I ran into the following error when I ran my code:
ArrivalManager: Database is not loaded. Loading now...
ArrivalManager: It might take a while...
java.io.IOException: Server returned HTTP response code: 403 for URL: https://db.kmbeta.ml/kmbeta_db.json
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at com.github.mob41.kmbeta.api.BusDatabase.loadWebDB(BusDatabase.java:173)
at com.github.mob41.kmbeta.api.ArrivalManager.<init>(ArrivalManager.java:163)
at com.github.mob41.kmbeta.api.ArrivalManager.<init>(ArrivalManager.java:72)
at test.Test.main(Test.java:17)
ArrivalManager: Could not load database. Check your internet connection or the database file placed near your application.
Exception in thread "main" com.github.mob41.kmbeta.exception.CouldNotLoadDatabaseException: Could not load database. Check your internet connection or the database file placed near your application.
at com.github.mob41.kmbeta.api.ArrivalManager.<init>(ArrivalManager.java:186)
at com.github.mob41.kmbeta.api.ArrivalManager.<init>(ArrivalManager.java:72)
at test.Test.main(Test.java:17)
However, I am able to open https://db.kmbeta.ml/kmbeta_db.json in my Chrome browser, so this shouldn't be the server's problem.
Do you have any idea why this would occur? Thank you!
The text was updated successfully, but these errors were encountered:
I am still investigating about this error. The downloaded .json file should be placed next to the application .jar/.exe file. If testing your project in eclipse IDE or something, put the database in your project folder.
By using the child method BusDatabase.loadDatabase(Object classParent, boolean loadFromClassResources) you can load file from the file-system (near the application) or from the class resources.
For example:
To load a database file near the application: BusDatabase.loadDatabase(false);
To load a database file in the class resources: BusDatabase.loadDatabase(YourClass.class, true);
or
BusDatabase.loadDatabase(true);
This method will use BusDatabase.class as root class
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi! I was following the quick start guide to setup the api.
First of all, according to the javadoc,
getRemainingArrivalTimeText
method doesn't exist anymore. Also, I ran into the following error when I ran my code:However, I am able to open https://db.kmbeta.ml/kmbeta_db.json in my Chrome browser, so this shouldn't be the server's problem.
Do you have any idea why this would occur? Thank you!
The text was updated successfully, but these errors were encountered: