我最近下载了 Osmosis 以将 .osm.pbf 文件转换为 .map 文件。我正在为这个应用程序使用 Windows 7。我已经从他们的系统下载了最新的zip 文件,并将 mapfilewriter jar 文件放入 /lib/default/ 文件夹中。但是,当我在 .bat 文件中运行此语句时,我不断收到此错误:
osmosis --read-pbf file=taiwanlatest.osm.pbf --mapfile-writer file=helloworld.map
Mar 19, 2013 7:34:49 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.42
Mar 19, 2013 7:34:49 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
Mar 19, 2013 7:34:50 PM org.mapsforge.map.writer.osmosis.MapFileWriterTask <init>
INFO: mapfile-writer version: mapsforge-map-writer-0.3.0
Mar 19, 2013 7:34:50 PM org.mapsforge.map.writer.osmosis.MapFileWriterTask <init>
INFO: mapfile format specification version: 3
Mar 19, 2013 7:34:50 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
Mar 19, 2013 7:34:50 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
Mar 19, 2013 7:34:50 PM org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion
SEVERE: Thread for task 1-read-pbf failed
java.lang.AbstractMethodError: org.mapsforge.map.writer.osmosis.MapFileWriterTas
k.initialize(Ljava/util/Map;)V
at crosby.binary.osmosis.OsmosisReader.run(OsmosisReader.java:43)
at java.lang.Thread.run(Thread.java:722)
Mar 19, 2013 7:34:50 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.waitForComple
tion(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(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Laun
cher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:239)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
我已经阅读过,似乎这是由于渗透本身造成的,我必须使用较低版本的渗透。我尝试使用 Osmosis 0.40 版,但在运行 .bat 文件时出现此错误:
Error: Could not find or load main class org.codehaus.classworlds.Launcher
我到底哪里错了?