[OSM-dev] Problem running osmosis (PluginLifecycleException)
Brett Henderson
brett at bretth.com
Sun Jun 21 09:14:24 BST 2009
Christoph Eckert wrote:
> Hi,
>
> I try to extract some data from an osm file using osmosis. I invoke it like
> this:
>
> java -mx1024m -jar ./osmosis-0.31/osmosis.jar --read-xml
> file="someosm.bz" --node-key-value place.city,place.town --way-key-value
> highway.motorway,highway.trunk,highway.primary,highway.secondary --write-xml
> file="evenless.osm"
>
> However I get some error:
> org.openstreetmap.osmosis.core.Osmosis main
> SCHWERWIEGEND: Execution aborted.
> java.lang.NoClassDefFoundError: org/java/plugin/PluginLifecycleException
> at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:73)
> at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:30)
>
You need to have all of the jar files in the osmosis/lib/default
directory available on the classpath. This includes jpf-1.5.jar which
contains the missing class org/java/plugin/PluginLifecycleException
listed above.
If osmosis.bat batch file or osmosis shell script files in the bin
directory should do this for you. Is there a reason you can't use the
launch scripts provided?
> The java version is:
> java -version
> java version "1.6.0_03"
> Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
> Java HotSpot(TM) Server VM (build 1.6.0_03-b05, mixed mode)
>
> I searched the web and the archives of this list and found some advice. Due to
> my complete ignorance of Java I didn't manage to put the puzzle together,
> though. Do I need to set some environment variable to point java to some
> plugin or library locations? Do I need to install a later Java version (I
> already tried to install a recent version from java.com in a local sandbox
> directory, but to no avail)? Any other hint?
>
The java version you are using is fine. You're just missing the
additional jars required to make osmosis run. osmosis.jar itself only
contains osmosis classes, it doesn't include all of the external
dependencies required.
Brett
More information about the dev
mailing list