Repository navigation
Description
when i first run ./graphhopper.sh -a web -i europe_germany_berlin.pbf on my windows10 ,it is come out.
`io.dropwizard.configuration.ConfigurationParsingException: config.yml has an error:
-
Failed to parse configuration at: graphhopper.graph; Cannot deserialize instance of
java.lang.Stringout of START_OBJECT token
at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: com.graphhopper.http.GraphHopperServerConfiguration["graphhopper"]->java.util.LinkedHashMap["graph"])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_OBJECT token
at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: com.graphhopper.http.GraphHopperServerConfiguration["graphhopper"]->java.util.LinkedHashMap["graph"])
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.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1093)
at com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:63)
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`
Activity
easbar commentedon Feb 19, 2020
Thanks for reporting. If you want to get started, it would be best to use the latest stable release (0.13). The problem here is once again that dropwizard does not allow setting a missing (nested) property via the command line.
Changing the beginning of
config-example.ymlto this:should make it work also for current master. After you change
config-example.ymlyou need to deleteconfig.ymlthough (otherwise the changes will not be picked up bygraphhopper.sh).@karussell Shall we modify
config-example.ymlas I suggested? Should we add a note to quick start docs that one should always use the latest stable release?[-]Quick Start Guide for Developers[/-][+]Command line arguments in graphhopper.sh not working with current config-example.yml[/+]VoidK2 commentedon Feb 19, 2020
can not work with your reply ..
ERROR io.dropwizard.cli.ServerCommand - Unable to start server, shutting down java.lang.IllegalStateException: Version of edges unsupported: 14, expected:15. Make sure you are using the same GraphHopper version for reading the files that was used for creating them. See https://discuss.graphhopper.com/t/722 at com.graphhopper.storage.StorableProperties.check(StorableProperties.java:184)VoidK2 commentedon Feb 19, 2020
but is worked with original qucikstart on my another computer(windows server 2016) ,but it is the same jdk,config_xml,osm_data
easbar commentedon Feb 19, 2020
Thats another error now. Make sure you delete the -gh folder (for example if you did not specify otherwise and used
europe_germany_berlin.osm.pbfits probably namedeurope_germany_berlin-gh). GraphHopper does not support using an existing graph folder with a newer version (in case the format was changed in between versions). Thats also the reason it worked on your other computer: The graph folder probably did not already exist on that one.VoidK2 commentedon Feb 19, 2020
thanks for your help ,is worked! love you ! may i ask ,how to modify code with IDEA ? which folder should i import to idea?(just web service and a web page)
karussell commentedon Feb 19, 2020
Yes, at least if this is still a problem for dropwizard. Or should we workaround it for these two properties?
Hmmh, I think that the latest docs should always use master. But if you click on the stable 0.13 docs (here) you will get to the quick start that indicates switching to 0.13 branch, I think. But maybe something else needs improvement?
easbar commentedon Feb 19, 2020
I would do
File -> New... -> Project from existing sources ...and then choose thepom.xmlfile at the root of the graphhopper directory. If you have further usage related questions please use the forum at: https://discuss.graphhopper.com/easbar commentedon Feb 19, 2020
I think its a problem for dropwizard because the properties contain dots which indicate that there is a nested structure for dropwizard. For example using
-Ddw.graphhopper.xyzworks but something like-Ddw.graphhopper.graph.xyzrequires the config file to contain agraphobject under thegraphhoppernode...Workaround, you mean manually checking for the property? Ok yes we could do that, but it would be just that, a workaround :) If we really want to improve something maybe using property names without dots would be better? Is it too ugly to add 'meaningless' placeholders (like the empty datareader.file name and some default graphhopper folder name (just so it can be overwritten using command line))? We could even add an empty object and it should work:
graphhopper.graph: {}.ok
use snake_case globally, also fix #1921
JeongJun-Lee commentedon Feb 28, 2020
same here. I tried it on 0.13 brach
karussell commentedon Feb 28, 2020
If you are on the 0.13 branch, please use this config file and command line parameters like e.g.
-Dgraphhopper.graph.location=graph-cache(without thedw.prefix!).For 1.0 and later the usage can change. See the documentation in: https://github.com/graphhopper/graphhopper#get-started
JeongJun-Lee commentedon Feb 28, 2020
@karussell When I removed the dw. prefix and used config for 0.13 version as your recommendation, the content of error is changed like below:
java.lang.IllegalArgumentException: entry in encoder list not supported pt
at com.graphhopper.routing.util.DefaultFlagEncoderFactory.createFlagEncoder(DefaultFlagEncoderFactory.java:60)
Now I am trying to run GTFS by this guideline: https://github.com/graphhopper/graphhopper/blob/master/reader-gtfs/README.md#quick-start
karussell commentedon Feb 28, 2020
It is master you need the documentation of 0.13: https://github.com/graphhopper/graphhopper/blob/0.13/reader-gtfs/README.md#quick-start
JeongJun-Lee commentedon Feb 28, 2020
@karussell sorry for that. The error(entry in encoder list not supported pt) would be happened when the gtfs.file option, -Dgraphhopper.gtfs.file=gtfs-vbb.zip was not included. For GTFS, the option looks like a mandatory.
karussell commentedon Mar 30, 2020
@JeongJun-Lee Can you have a look if the suggested fix / workaround applies to your problems too? #1973