[osmosis-dev] TagTransform plugin: Error

Richard Redweik richard.redweik at yahoo.de
Wed Mar 21 14:26:18 GMT 2012


Dear List,

i am trying to use the TagTransform plugin [1].

I am using osmosis 0.39 on ubuntu 11.10.

I installed osmosis as follows (similar as described in [1]):
- I unpacked the osmosis-latest.tgz somewhere
- I created the "$OSMOSIS/config/osmosis-plugins.conf" and added
 "uk.co.randomjunk.osmosis.transform.TransformPlugin"
- I downloaded http://dev.openstreetmap.org/~random/tagtransform.jar into "$OSMOSIS/lib/default/".

When i am trying to execute osmosis with the "-p" option
"./osmosis -p uk.co.randomjunk.osmosis.transform.TransformPlugin --read-xml file=/home/richard/Downloads/sachsen-anhalt.osm --tag-transform file=/home/richard/Desktop/mapping.xml --write-xml file=/home/richard/Desktop/transformed.osm"
i get an osmosis runtime exception [3].

But when i am trying to execute osmosis without the "-p" option
"./osmosis --read-xml file=/home/richard/Downloads/sachsen-anhalt.osm --tag-transform file=/home/richard/Desktop/mapping.xml --write-xml file=/home/richard/Desktop/transformed.osm"
I get a NoClassDefFoundError [4]. The error is similar to [2] but the restart does not help.


Now my questions:
How to use the tagtransform plugin in the right way?

Does someone got an idea how to fix the problem?


Thanks in advance and regards,
Richard Redweik


[1] http://wiki.openstreetmap.org/wiki/Osmosis/TagTransform


[2] http://lists.openstreetmap.org/pipermail/osmosis-dev/2012-March/001249.html


[3] 

21.03.2012 15:14:46 org.openstreetmap.osmosis.core.Osmosis main
SCHWERWIEGEND: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Only one default (un-named) argument can exist per task.  Arguments 10 and 9 have no name.
    at org.openstreetmap.osmosis.core.cli.CommandLineParser.parseTask(CommandLineParser.java:317)
    at org.openstreetmap.osmosis.core.cli.CommandLineParser.parse(CommandLineParser.java:90)
    at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:74)
    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:616)
    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:31)

[4]

21.03.2012 15:16:38 org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.39
21.03.2012 15:16:38 org.openstreetmap.osmosis.core.Osmosis main
SCHWERWIEGEND: Execution aborted.
java.lang.NoClassDefFoundError: com/bretth/osmosis/core/plugin/PluginLoader
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:386)
    at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
    at org.openstreetmap.osmosis.core.TaskRegistrar.loadPluginClass(TaskRegistrar.java:325)
    at org.openstreetmap.osmosis.core.TaskRegistrar.loadPlugin(TaskRegistrar.java:306)
    at org.openstreetmap.osmosis.core.TaskRegistrar.loadBuiltInPlugins(TaskRegistrar.java:123)
    at org.openstreetmap.osmosis.core.TaskRegistrar.initialize(TaskRegistrar.java:80)
    at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:81)
    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:616)
    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:31)
Caused by: java.lang.ClassNotFoundException: com.bretth.osmosis.core.plugin.PluginLoader
    at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
    ... 27 more
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20120321/80e7ba40/attachment.html>


More information about the osmosis-dev mailing list