Harish Garg
Harish Garg

Reputation: 139

Opentripplanner Graph.obj file not found error

Trying to run the opentripplanner and using the Graph.obj to run it for a country.

But whenever trying to run the server it is giving the filenotfound exception at location /otp/Graph.obj although i have put the Graph.obj in the same location.

Stacktrace while running the server is :

Graph file not found or not openable for routerId '' under file:/otp java.io.FileNotFoundException: /otp/Graph.obj (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:146) at java.io.FileInputStream.(FileInputStream.java:101) at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)

Upvotes: 2

Views: 1140

Answers (2)

aldimeola1122
aldimeola1122

Reputation: 818

Try this code: java -Xmx5G -jar target/otp-0.20.0-SNAPSHOT-shaded.jar --build path your gtfs and osm.pbf files --inMemory

It worked perfect for me.

Upvotes: 0

Bizarro
Bizarro

Reputation: 399

I had the same problem trying to run OTP.

First problem: the routerId is missing

Second problem: the default directory is /var/otp/graph and OTP seems to search the graph under /var/otp/graph/{routerId}

Third problem (may not be yours): I tried to run OTP in Cygwin (Windows) and probably there was some trouble with the slashes/backslashes, so I decided to copy the graph under a "../gtfs/gurgaon"

Solution:

Step 1) create a subdirectory like "/var/otp/graph/gurgaon" and copied Graph.obj over there

Step 2) run something like: $ java -jar target/otp.jar --router gurgaon --graphs ../gtfs --server

It worked like a charm for me!

Upvotes: 4

Related Questions