2

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)

rafa.pereira
  • 13,251
  • 6
  • 71
  • 109
Harish Garg
  • 139
  • 8

2 Answers2

4

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!

Bizarro
  • 399
  • 4
  • 12
0

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.

aldimeola1122
  • 806
  • 5
  • 13
  • 23