0

I have download latest version (0.46) of osmosis from
https://wiki.openstreetmap.org/wiki/Osmosis#Downloading
and mapsforge-map-writer-0.9.1.jar from http://search.maven.org/#search%7Cga%7C1%7Cmapsforge-map
and map ("AM.osm") from
http://be.gis-lab.info/data/osm_dump/dump/latest/

I'm on Windows-7 64-bit Professional and JDK 1.8u45
I unpacked osmosis to: "c:\Progs\osmosis"
I created a folder called "plugins" in "c:\Progs\osmosis" (>> so: "c:\Progs\osmosis\plugins")
In the plugins folder I put the file "mapsforge-map-writer-0.9.1.jar"
I put the file "AM.osm.pbf" (and "AM.osm") into "c:\Progs\osmosis"

I then opened a command-prompt window and executed the following commands:

PS C:\Progs\osmosis> osmosis --rb file=AM.osm.pbf --mw file=AM.map

PS C:\Progs\osmosis> osmosis --rx file=AM.osm --mw file=AM.map type=hd

I got this error:

ьр  23, 2018 9:46:43 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.46
ьр  23, 2018 9:46:43 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
ьр  23, 2018 9:46:43 AM org.openstreetmap.osmosis.core.Osmosis main
SEVERE: Execution aborted.
java.lang.NoClassDefFoundError: gnu/trove/procedure/TShortIntProcedure
        at org.mapsforge.map.writer.model.MapWriterConfiguration.loadTagMappingFile(MapWriterConfiguration.java:351)
        at org.mapsforge.map.writer.osmosis.MapFileWriterFactory.createTaskManagerImpl(MapFileWriterFactory.java:58)
        at org.openstreetmap.osmosis.core.pipeline.common.TaskManagerFactory.createTaskManager(TaskManagerFactory.java:60)
        at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.buildTasks(Pipeline.java:51)
        at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.prepare(Pipeline.java:112)
        at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:86)
        at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
Caused by: java.lang.ClassNotFoundException: gnu.trove.procedure.TShortIntProcedure
        at org.java.plugin.standard.StandardPluginClassLoader.loadClass(StandardPluginClassLoader.java:330)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 16 more
0

The problem is solved:

there were not enough dependencies, need to download link "jar-with-dependencies.jar"

Error java.lang.OutOfMemoryError is solved by parameter "type=hd" (default "type=ram"):

C:\Progs\osmosis> osmosis --rb file=local.osm.pbf --mw file=local.osm.map type=hd

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.