Start GHServer from Intellij (message: Not found)

Hey,

i tried to run the GHServer from Intellij as it is explained in this topic: How to develop or change stuff in GraphHopper and use IDE features like debugging etc?

Intellij log:

2015-12-08 11:34:32,346 [main] INFO com.graphhopper.GraphHopper - version 0.6|2015-12-07T14:59:42Z (4,13,3,2,2,1)
2015-12-08 11:34:32,353 [main] INFO com.graphhopper.GraphHopper - graph foot,wheelchair|RAM_STORE|3D|NoExt|4,13,3,2,2, details:edges:646 252(20MB), nodes:491 868(8MB), name:(2MB), geo:4 546 528(18MB), bounds:7.096243994599074,8.98973049200469,50.6768677534953,51.77152943100474,0.0,100.66999816894531
2015-12-08 11:34:32,353 [main] INFO com.graphhopper.http.DefaultModule - loaded graph at:arnsberg-regbez-gh, source:arnsberg-regbez.osm, flagEncoders:foot,wheelchair, class:edges:646 252(20MB), nodes:491 868(8MB), name:(2MB), geo:4 546 528(18MB), bounds:7.096243994599074,8.98973049200469,50.6768677534953,51.77152943100474,0.0,100.66999816894531
2015-12-08 11:34:32,976 [main] INFO com.graphhopper.http.GHServer - Started server at HTTP :8989

But when i open Chrome an go to http://localhost:8989/ I get the Message:

{“message”: “Not found”}

If i run the same Code via cygwin it works fine

Help, please.

The resource path needs adjustment. I.e. you need to tell IntelliJ the correct location e.g. via the following JVM parameter

-Djetty.resourcebase=./src/main/webapp

probably?

-Djetty.resourcebase=./web/src/main/webapp

Thank you :smile:

jetty.port=8989 
jetty.resourcebase=./web/src/main/webapp 
config=config.properties 
osmreader.osm=arnsberg-regbez.osm 

This works fine for me.

1 Like