bmwcarit / barefoot

Java map matching library for integrating the map into software and services with state-of-the-art online and offline map matching that can be used stand-alone and in the cloud.
Apache License 2.0
664 stars 185 forks source link

Installation problem #130

Closed biallen closed 5 years ago

biallen commented 5 years ago

hey, when i run import.sh ,i meet the problem

java.util.zip.DataFormatException: invalid distance code
        at java.util.zip.Inflater.inflateBytes(Native Method)
        at java.util.zip.Inflater.inflate(Inflater.java:259)
        at java.util.zip.Inflater.inflate(Inflater.java:280)
        at org.openstreetmap.osmosis.osmbinary.file.FileBlockPosition.parseData(FileBlockPosition.java:57)
        at org.openstreetmap.osmosis.osmbinary.file.FileBlockHead.readContents(FileBlockHead.java:95)
        at org.openstreetmap.osmosis.osmbinary.file.FileBlock.process(FileBlock.java:135)
        at org.openstreetmap.osmosis.osmbinary.file.BlockInputStream.process(BlockInputStream.java:34)
        at crosby.binary.osmosis.OsmosisReader.run(OsmosisReader.java:45)
        at java.lang.Thread.run(Thread.java:748)
Jan 21, 2019 5:34:21 PM org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion
SEVERE: Thread for task 1-read-pbf failed
java.lang.Error: java.util.zip.DataFormatException: invalid distance code
        at org.openstreetmap.osmosis.osmbinary.file.FileBlockPosition.parseData(FileBlockPosition.java:60)
        at org.openstreetmap.osmosis.osmbinary.file.FileBlockHead.readContents(FileBlockHead.java:95)
        at org.openstreetmap.osmosis.osmbinary.file.FileBlock.process(FileBlock.java:135)
        at org.openstreetmap.osmosis.osmbinary.file.BlockInputStream.process(BlockInputStream.java:34)
        at crosby.binary.osmosis.OsmosisReader.run(OsmosisReader.java:45)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.zip.DataFormatException: invalid distance code
        at java.util.zip.Inflater.inflateBytes(Native Method)
        at java.util.zip.Inflater.inflate(Inflater.java:259)
        at java.util.zip.Inflater.inflate(Inflater.java:280)
        at org.openstreetmap.osmosis.osmbinary.file.FileBlockPosition.parseData(FileBlockPosition.java:57)
        ... 5 more

Jan 21, 2019 5:34:21 PM org.openstreetmap.osmosis.core.Osmosis main
SEVERE: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more tasks failed.
        at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForCompletion(Pipeline.java:146)
        at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:92)
        at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:47)

How to solve; thank you!

smattheis commented 5 years ago

Do you follow the quick start (using a Docker container) or a different setting. Can you tell me which map file you're importing? Best would be a link to the exact file, e.g., on Geofabrik.

biallen commented 5 years ago

您是否遵循快速启动(使用Docker容器)或其他设置。你能告诉我你要导入哪个地图文件吗?Best是指向确切文件的链接,例如,在Geofabrik上。

使用mac vm,centos6.5对vm,jdk 1.8 运行在 docker container oberbayern-latest.osm.pbf这个映射文件 运行时此命令有错误 image

smattheis commented 5 years ago

I cannot reproduce the problem. I downloaded, built, imported, and executed everything from scratch to see if some incompatibility or version clash was introduced, but this seems not to be the case. Could you please try downloading the osm.pbf file again (check that there is no download error). If the problem still occurs, please try building also the docker image from scratch and post ALL log output in this thread.

biallen commented 5 years ago

I cannot reproduce the problem. I downloaded, built, imported, and executed everything from scratch to see if some incompatibility or version clash was introduced, but this seems not to be the case. Could you please try downloading the osm.pbf file again (check that there is no download error). If the problem still occurs, please try building also the docker image from scratch and post ALL log output in this thread.

thank you ,i solve this problem,because , when i upload the oberbayern-latest.osm.pbf file in docker,the file append the (oberbayern-latest.osm.pbf),so osmosis resolving the oberbayern-latest.osm.pbf cannot distinguish the .

biallen commented 5 years ago

but . i meet other problem

image, i want ask question
image those plugs install centos or docker or both all install thos plugs

smattheis commented 5 years ago

a) You probably have a configuration problem. To help you I need more information:

b) The "plugs" you do not need to install if you use the Docker container.

biallen commented 5 years ago

a) You probably have a configuration problem. To help you I need more information:

  • What's the content of the properties files you're using?
  • Which data do you have imported? How did you set up the the map server?
  • What is the full log output (not only a screenshot of some fraction)?

b) The "plugs" you do not need to install if you use the Docker container.

a> using server.properties and oberbayern.properties b> imort data i download url ttp://download.geofabrik.de/europe/germany/bayern/oberbayern-latest.osm.pbf ,run import.sh c> i select table ,no table bfmap_ways in database,but when i run import.sh , aleardy create this table and insert data . d> i run this command : java -jar target/barefoot-0.1.5-matcher-jar-with-dependencies.jar --geojson ${PWD}/config/server.properties ${PWD}/config/oberbayern.properties,have error,the log output : com.bmwcarit.barefoot.util.SourceException: Executing PostgreSQL query failed: ERROR: relation "bfmap_ways" does not exist 位置:133 at com.bmwcarit.barefoot.util.PostgresSource.execute(PostgresSource.java:122) ~[barefoot-0.1.5-matcher-jar-with-dependencies.jar:na] at com.bmwcarit.barefoot.road.PostGISReader.next(PostGISReader.java:130) ~[barefoot-0.1.5-matcher-jar-with-dependencies.jar:na] at com.bmwcarit.barefoot.roadmap.RoadMap.Load(RoadMap.java:140) ~[barefoot-0.1.5-matcher-jar-with-dependencies.jar:na] at com.bmwcarit.barefoot.roadmap.Loader.roadmap(Loader.java:96) ~[barefoot-0.1.5-matcher-jar-with-dependencies.jar:na] at com.bmwcarit.barefoot.matcher.ServerControl.initServer(ServerControl.java:72) [barefoot-0.1.5-matcher-jar-with-dependencies.jar:na] at com.bmwcarit.barefoot.matcher.ServerControl.main(ServerControl.java:162) [barefoot-0.1.5-matcher-jar-with-dependencies.jar:na] Caused by: org.postgresql.util.PSQLException: ERROR: relation "bfmap_ways" does not exist 位置:133 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157) ~[barefoot-0.1.5-matcher-jar-with-dependencies.jar:na] at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886) ~[barefoot-0.1.5-matcher-jar-with-dependencies.jar:na] at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) ~[barefoot-0.1.5-matcher-jar-with-dependencies.jar:na] at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555) ~[barefoot-0.1.5-matcher-jar-with-dependencies.jar:na] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:403) ~[barefoot-0.1.5-matcher-jar-with-dependencies.jar:na] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:283) ~[barefoot-0.1.5-matcher-jar-with-dependencies.jar:na] at com.bmwcarit.barefoot.util.PostgresSource.execute(PostgresSource.java:119) ~[barefoot-0.1.5-matcher-jar-with-dependencies.jar:na] ... 5 common frames omitted 2019-01-23 15:08:12,950 INFO [Thread-0] ServerControl: stopping server 2019-01-23 15:08:12,950 ERROR [Thread-0] ServerControl: stopping server failed, not yet started

image

smattheis commented 5 years ago

Please do not only post the error message. Instead, post the complete log output of the Java process. Further, please also post the command you used to start the container.

biallen commented 5 years ago

Please do not only post the error message. Instead, post the complete log output of the Java process. Further, please also post the command you used to start the container.

this is compete log output of the java process image