Quickstart Error

I’m following the quickstart guide on Github found here https://github.com/graphhopper/graphhopper/blob/master/docs/web/quickstart.md
but I’m encountering an error when trying to start Graphhopper

I have the files organized like so

after running the command
java -Ddw.graphhopper.datareader.file=ontario-latest.osm.pbf -jar graphhopper-web-0.13.0.jar server config-example.yml

both in CMD and git bash I receive the following errors

        D:\Users\alexp\Downloads\routing>java -Ddw.graphhopper.datareader.file=ontario-latest.osm.pbf -jar graphhopper-web-0.13.0.jar server config-example.yml
        io.dropwizard.configuration.ConfigurationParsingException: config-example.yml has an error:
        * Failed to parse configuration at: graphhopper.profiles; Cannot deserialize instance of `java.lang.String` out of START_ARRAY token
 at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: com.graphhopper.http.GraphHopperServerConfiguration["graphhopper"]->java.util.LinkedHashMap["profiles"])

        at io.dropwizard.configuration.ConfigurationParsingException$Builder.build(ConfigurationParsingException.java:279)
        at io.dropwizard.configuration.BaseConfigurationFactory.build(BaseConfigurationFactory.java:156)
        at io.dropwizard.configuration.BaseConfigurationFactory.build(BaseConfigurationFactory.java:89)
        at io.dropwizard.cli.ConfiguredCommand.parseConfiguration(ConfiguredCommand.java:126)
        at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:74)
        at io.dropwizard.cli.Cli.run(Cli.java:78)
        at io.dropwizard.Application.run(Application.java:93)
        at com.graphhopper.http.GraphHopperApplication.main(GraphHopperApplication.java:34)
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token
 at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: com.graphhopper.http.GraphHopperServerConfiguration["graphhopper"]->java.util.LinkedHashMap["profiles"])
        at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:63)
        at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1343)
        at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1139)
        at com.fasterxml.jackson.databind.deser.std.StdDeserializer._deserializeFromArray(StdDeserializer.java:675)
        at com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:40)
        at com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:10)
        at com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringKeyMap(MapDeserializer.java:527)
        at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:364)
        at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:29)
        at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:3984)
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2300)
        at com.fasterxml.jackson.core.JsonParser.readValueAs(JsonParser.java:1752)
        at com.graphhopper.jackson.CmdArgsDeserializer.deserialize(CmdArgsDeserializer.java:21)
        at com.graphhopper.jackson.CmdArgsDeserializer.deserialize(CmdArgsDeserializer.java:13)
        at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:138)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)
        at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:3984)
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2276)
        at io.dropwizard.configuration.BaseConfigurationFactory.build(BaseConfigurationFactory.java:127)
        ... 6 more'

The quickstart docs for 0.13 are here: https://github.com/graphhopper/graphhopper/blob/0.13/docs/web/quickstart.md (let me know where you found the wrong master link)

The config.yml format will change for 1.0 (snake_case instead camelCase for 0.13) and also the parameters are slightly different (1.0 requires a dw. prefix)

When you switch to the 0.13 branch, make sure you remove the config.yml otherwise the new config-example.yml won’t overwrite config.yml.

Perfect! The new config got it working

On the Graphhopper Github

I went under the “For the Web” heading and followed the “install it” link to https://github.com/graphhopper/graphhopper/blob/master/docs/index.md

And then under the “For Users” Heading I followed the “this user guide” link to

1 Like

Ah, thanks. This should indeed not link to the master docs. Will fix that.

Powered by Discourse