Localhost:8989 works perfectly for car routing (except I am trying to slow the timings down, but I’ve not got that far in yet).
At the moment, I’m trying to adjust the config file as follows, just to add foot and bike routes.
# Possible options: car,foot,bike,bike2,mtb,racingbike,motorcycle (comma separated)
# bike2 takes elevation data into account (like up-hill is slower than down-hill)
graph.flag_encoders=car, foot
I get the following error messages.
INFO: An exception was caught and reported. Message: java.lang.IllegalStateException: Encoding does not match:
Graphhopper config: car|speed_factor=5.0|speed_bits=5|turn_costs=false|version=1,foot|speed_factor=1.0|speed_bits=4|turn_costs=false|version=2
Graph: car|speed_factor=5.0|speed_bits=5|turn_costs=false|version=1, dir:devon-latest.osm-gh/
java.lang.IllegalStateException: Couldn't load graph
at com.graphhopper.http.DefaultModule.configure(DefaultModule.java:76)
at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.AbstractModule.install(AbstractModule.java:122)
at com.graphhopper.http.GHServer$1.configure(GHServer.java:119)
at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.spi.Elements.getElements(Elements.java:110)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
at com.google.inject.Guice.createInjector(Guice.java:96)
at com.google.inject.Guice.createInjector(Guice.java:73)
at com.google.inject.Guice.createInjector(Guice.java:62)
at com.graphhopper.http.GHServer.start(GHServer.java:59)
at com.graphhopper.http.GHServer.main(GHServer.java:55)
Caused by: java.lang.IllegalStateException: Encoding does not match:
Graphhopper config: car|speed_factor=5.0|speed_bits=5|turn_costs=false|version=1,foot|speed_factor=1.0|speed_bits=4|turn_costs=false|version=2
Graph: car|speed_factor=5.0|speed_bits=5|turn_costs=false|version=1, dir:devon-latest.osm-gh/
at com.graphhopper.storage.GraphHopperStorage.loadExisting(GraphHopperStorage.java:235)
at com.graphhopper.GraphHopper.load(GraphHopper.java:801)
at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:657)
at com.graphhopper.http.DefaultModule.createGraphHopper(DefaultModule.java:53)
at com.graphhopper.http.DefaultModule.configure(DefaultModule.java:64)
... 14 more
Exception in thread "main" com.google.inject.CreationException: Unable to create injector, see the following errors:
1) Explicit bindings are required and java.lang.Boolean annotated with @com.google.inject.name.Named(value=jsonp_allowed) is not explicitly bound.
while locating java.lang.Boolean annotated with @com.google.inject.name.Named(value=jsonp_allowed)
for field at com.graphhopper.http.GHBaseServlet.jsonpAllowed(GHBaseServlet.java:41)
at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:60) (via modules: com.graphhopper.http.GHServer$1 -> com.graphhopper.http.GHServletModule)
2) Explicit bindings are required and java.lang.Boolean annotated with @com.google.inject.name.Named(value=jsonp_allowed) is not explicitly bound.
while locating java.lang.Boolean annotated with @com.google.inject.name.Named(value=jsonp_allowed)
for field at com.graphhopper.http.GHBaseServlet.jsonpAllowed(GHBaseServlet.java:41)
at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:63) (via modules: com.graphhopper.http.GHServer$1 -> com.graphhopper.http.GHServletModule)
3) Explicit bindings are required and java.lang.Boolean annotated with @com.google.inject.name.Named(value=jsonp_allowed) is not explicitly bound.
while locating java.lang.Boolean annotated with @com.google.inject.name.Named(value=jsonp_allowed)
for field at com.graphhopper.http.GHBaseServlet.jsonpAllowed(GHBaseServlet.java:41)
at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:66) (via modules: com.graphhopper.http.GHServer$1 -> com.graphhopper.http.GHServletModule)
4) Explicit bindings are required and java.lang.Boolean annotated with @com.google.inject.name.Named(value=jsonp_allowed) is not explicitly bound.
while locating java.lang.Boolean annotated with @com.google.inject.name.Named(value=jsonp_allowed)
for field at com.graphhopper.http.GHBaseServlet.jsonpAllowed(GHBaseServlet.java:41)
at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:69) (via modules: com.graphhopper.http.GHServer$1 -> com.graphhopper.http.GHServletModule)
5) An exception was caught and reported. Message: Couldn't load graph
at com.graphhopper.http.GHServer$1.configure(GHServer.java:119) (via modules: com.graphhopper.http.GHServer$1 -> com.graphhopper.http.DefaultModule)
6) Explicit bindings are required and com.graphhopper.GraphHopper is not explicitly bound.
while locating com.graphhopper.GraphHopper
for field at com.graphhopper.http.GraphHopperServlet.hopper(GraphHopperServlet.java:57)
at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:66) (via modules: com.graphhopper.http.GHServer$1 -> com.graphhopper.http.GHServletModule)
7) Explicit bindings are required and com.graphhopper.http.RouteSerializer is not explicitly bound.
while locating com.graphhopper.http.RouteSerializer
for field at com.graphhopper.http.GraphHopperServlet.routeSerializer(GraphHopperServlet.java:57)
at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:66) (via modules: com.graphhopper.http.GHServer$1 -> com.graphhopper.http.GHServletModule)
8) Explicit bindings are required and com.graphhopper.util.TranslationMap is not explicitly bound.
while locating com.graphhopper.util.TranslationMap
for field at com.graphhopper.http.I18NServlet.map(I18NServlet.java:35)
at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:60) (via modules: com.graphhopper.http.GHServer$1 -> com.graphhopper.http.GHServletModule)
9) Explicit bindings are required and com.graphhopper.GraphHopper is not explicitly bound.
while locating com.graphhopper.GraphHopper
for field at com.graphhopper.http.InfoServlet.hopper(InfoServlet.java:38)
at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:63) (via modules: com.graphhopper.http.GHServer$1 -> com.graphhopper.http.GHServletModule)
10) Explicit bindings are required and com.graphhopper.GraphHopper is not explicitly bound.
while locating com.graphhopper.GraphHopper
for field at com.graphhopper.http.NearestServlet.hopper(NearestServlet.java:40)
at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:69) (via modules: com.graphhopper.http.GHServer$1 -> com.graphhopper.http.GHServletModule)
10 errors
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:466)
at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
at com.google.inject.Guice.createInjector(Guice.java:96)
at com.google.inject.Guice.createInjector(Guice.java:73)
at com.google.inject.Guice.createInjector(Guice.java:62)
at com.graphhopper.http.GHServer.start(GHServer.java:59)
at com.graphhopper.http.GHServer.main(GHServer.java:55)
Caused by: java.lang.IllegalStateException: Couldn't load graph
at com.graphhopper.http.DefaultModule.configure(DefaultModule.java:76)
at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.AbstractModule.install(AbstractModule.java:122)
at com.graphhopper.http.GHServer$1.configure(GHServer.java:119)
at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.spi.Elements.getElements(Elements.java:110)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
... 5 more
Caused by: java.lang.IllegalStateException: Encoding does not match:
Graphhopper config: car|speed_factor=5.0|speed_bits=5|turn_costs=false|version=1,foot|speed_factor=1.0|speed_bits=4|turn_costs=false|version=2
Graph: car|speed_factor=5.0|speed_bits=5|turn_costs=false|version=1, dir:devon-latest.osm-gh/
at com.graphhopper.storage.GraphHopperStorage.loadExisting(GraphHopperStorage.java:235)
at com.graphhopper.GraphHopper.load(GraphHopper.java:801)
at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:657)
at com.graphhopper.http.DefaultModule.createGraphHopper(DefaultModule.java:53)
at com.graphhopper.http.DefaultModule.configure(DefaultModule.java:64)
... 14 more