Unable to start graphhopper after disabling the speed mode in config

I am trying to disable speed mode so I can use the “heading” parameter for my routing.

prepare.chWeighting=no
#prepare.chWeighting=fastest

I receive following error when trying to restart graphhopper with this setting.
I have tried with 0.5, same result.
Was told I need to remove the graphhopper folder before restarting? Could you elaborate?

existing jar found tools/target/graphhopper-tools-0.6-SNAPSHOT-jar-with-dependencies.jar
now web. JAVA_OPTS=-Xmx1000m -Xms1000m -server
Dec 08, 2015 10:57:42 AM com.google.inject.internal.MessageProcessor visit
INFO: An exception was caught and reported. Message: java.lang.IllegalStateException: Configured graph.chWeightings: [] is not equal to loaded [fastest|car]
java.lang.IllegalStateException: Couldn’t load graph
at com.graphhopper.http.DefaultModule.configure(DefaultModule.java:84)
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:117)
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:64)
at com.graphhopper.http.GHServer.main(GHServer.java:50)
Caused by: java.lang.IllegalStateException: Configured graph.chWeightings: [] is not equal to loaded [fastest|car]
at com.graphhopper.storage.GraphHopperStorage.loadExisting(GraphHopperStorage.java:282)
at com.graphhopper.GraphHopper.load(GraphHopper.java:826)
at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:664)
at com.graphhopper.http.DefaultModule.createGraphHopper(DefaultModule.java:56)
at com.graphhopper.http.DefaultModule.configure(DefaultModule.java:69)
… 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=jsonpAllowed) is not explicitly bound.
    while locating java.lang.Boolean annotated with @com.google.inject.name.Named(value=jsonpAllowed)
    for field at com.graphhopper.http.GHBaseServlet.jsonpAllowed(GHBaseServlet.java:41)
    at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:61) (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=jsonpAllowed) is not explicitly bound.
    while locating java.lang.Boolean annotated with @com.google.inject.name.Named(value=jsonpAllowed)
    for field at com.graphhopper.http.GHBaseServlet.jsonpAllowed(GHBaseServlet.java:41)
    at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:64) (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=jsonpAllowed) is not explicitly bound.
    while locating java.lang.Boolean annotated with @com.google.inject.name.Named(value=jsonpAllowed)
    for field at com.graphhopper.http.GHBaseServlet.jsonpAllowed(GHBaseServlet.java:41)
    at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:67) (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=jsonpAllowed) is not explicitly bound.
    while locating java.lang.Boolean annotated with @com.google.inject.name.Named(value=jsonpAllowed)
    for field at com.graphhopper.http.GHBaseServlet.jsonpAllowed(GHBaseServlet.java:41)
    at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:70) (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:117) (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:56)
    at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:67) (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:56)
    at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:67) (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:36)
    at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:61) (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:40)
    at com.graphhopper.http.GHServletModule.configureServlets(GHServletModule.java:64) (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:70) (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:64)
at com.graphhopper.http.GHServer.main(GHServer.java:50)
Caused by: java.lang.IllegalStateException: Couldn’t load graph
at com.graphhopper.http.DefaultModule.configure(DefaultModule.java:84)
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:117)
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: Configured graph.chWeightings: [] is not equal to loaded [fastest|car]
at com.graphhopper.storage.GraphHopperStorage.loadExisting(GraphHopperStorage.java:282)
at com.graphhopper.GraphHopper.load(GraphHopper.java:826)
at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:664)
at com.graphhopper.http.DefaultModule.createGraphHopper(DefaultModule.java:56)
at com.graphhopper.http.DefaultModule.configure(DefaultModule.java:69)
… 14 more

if you call ./graphhopper.sh import your.pbf you need to remove the created folder your-gh to apply import config changes.

BTW: See also this issue as it already possible to run none CH algorithms on a CH prepared graph, but we need to make this easier to consume via URL parameters etc.

I am calling ./graphhopper.sh web my.pbf

this is what I get when I call ./graphhopper.sh import my.pbf

using java 1.7.0_85 from

using existing osm file /var/mapserver/australia-latest.osm.pbf

./graphhopper.sh: line 82: mvn: command not found

existing jar found tools/target/graphhopper-tools-0.5.0-jar-with-dependencies.jar

now import. JAVA_OPTS=-Xmx1000m -Xms1000m -server

Exception in thread “main” java.lang.IllegalStateException: Configured graph.chWeightings: [] is not equal to loaded [fastest|car]
at com.graphhopper.storage.GraphHopperStorage.loadExisting(GraphHopperStorage.java:278)
at com.graphhopper.GraphHopper.load(GraphHopper.java:770)
at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:612)
at com.graphhopper.tools.Import.main(Import.java:15)

removing the created folder my-gh should fix the issue be it for the import or web command

Sorry to be a pain! but I don’t seem to have a my-gh folder as you refer to. This is the contents of my graphhopper from git.

android
CONTRIBUTORS.md
LICENSE.txt
README.md
config-example.properties
core
maven
target
config.properties
docs
NOTICE.md
tools
CONTRIBUTING.md
graphhopper.sh
pom.xml
web

Please see the graphhopper folder which is created in the same directory like the pbf. E.g. if you have /my/path/my.pbf then have a look into /my/path/my-gh