Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 322127 - sci-geosciences/osmosis-0.35.1 version bump
Summary: sci-geosciences/osmosis-0.35.1 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal with 2 votes (vote)
Assignee: Hanno Böck
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-30 19:37 UTC by Michael Spreng
Modified: 2013-05-19 13:47 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild I was working on (osmosis-0.35.1.ebuild,967 bytes, text/plain)
2010-05-30 19:41 UTC, Michael Spreng
Details
script to create osmosis.conf (create-osmosisconf.sh,542 bytes, text/plain)
2010-07-12 13:59 UTC, Mitja Kleider
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Spreng 2010-05-30 19:37:08 UTC
a more recent osmosis is needed in order to process current Openstreetmap data.

Reproducible: Always

Steps to Reproduce:
Comment 1 Michael Spreng 2010-05-30 19:41:42 UTC
Created attachment 233557 [details]
ebuild I was working on

I tried to make a new ebuild. But I don't know how to write it propperly. Perhaps someone else could finish it.
The dependencies are taken from the ivy.xml included in the osmosis source package.

The ebuild DOES NOT WORK (yet)
Comment 2 Mitja Kleider 2010-06-15 21:17:52 UTC
This ebuild works:
http://gpo.zugaina.org/AJAX/Ebuild/2118478/View
Comment 3 Michael Spreng 2010-07-06 15:46:30 UTC
OK it compiles yes, but it doesn't run. The Error is:

java.lang.NoClassDefFoundError: org/java/plugin/PluginLifecycleException

so some java library is not found. I guess this could be either:
Because dependencies are downloaded by ivy, but then not installed.
Or:
Osmosis comes with its own runs cript. And I have no idea how to get this script (or parts of it) into the gentoo launcher.
Comment 4 Mitja Kleider 2010-07-06 16:42:22 UTC
I can confirm this error message.

The pre-built osmosis (installed to /opt/osmosis/osmosis-0.35.1) runs a helper script, which executes

java -cp /opt/osmosis/osmosis-0.35.1/lib/default/plexus-classworlds-2.2.2.jar -Dapp.home=/opt/osmosis/osmosis-0.35.1 -Dclassworlds.conf=/opt/osmosis/osmosis-0.35.1/config/plexus.conf org.codehaus.classworlds.Launcher

I do not know the difference between plexus-classworlds (bug #174995) and the dev-java/classworlds ebuild.

The launcher/helper script can be found in the osmosis source package at bin/osmosis and the config is at config/plexus.conf
Comment 5 Mitja Kleider 2010-07-06 17:18:49 UTC
This does not work either:

java -cp /usr/share/classworlds-1/lib/classworlds.jar -Dapp.home=/var -Dclassworlds.conf=/opt/osmosis/osmosis-0.35.1/config/plexus.conf org.codehaus.classworlds.Launcher
Exception in thread "main" java.lang.NullPointerException
        at org.codehaus.classworlds.Configurator.loadGlob(Configurator.java:363)
        at org.codehaus.classworlds.Configurator.configure(Configurator.java:233)
        at org.codehaus.classworlds.Launcher.configure(Launcher.java:181)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:457)
Comment 6 Mitja Kleider 2010-07-06 17:32:13 UTC
classworlds is supposed to load all necessary jars definded in plexus.conf, contents of plexus.conf:

main is org.openstreetmap.osmosis.core.Osmosis from osmosis.core

[osmosis.core]
load ${app.home}/lib/*.jar
load ${app.home}/lib/default/*.jar
load ${app.home}/osmosis.jar


ls /opt/osmosis/osmosis-0.35.1/lib/*.jar
No such file or directory

ls /opt/osmosis/osmosis-0.35.1/lib/default/*.jar
/opt/osmosis/osmosis-0.35.1/lib/default/aopalliance-1.0.jar
/opt/osmosis/osmosis-0.35.1/lib/default/commons-codec-1.4.jar
/opt/osmosis/osmosis-0.35.1/lib/default/commons-compress-1.0.jar
/opt/osmosis/osmosis-0.35.1/lib/default/commons-dbcp-1.2.2.jar
/opt/osmosis/osmosis-0.35.1/lib/default/commons-logging-1.1.1.jar
/opt/osmosis/osmosis-0.35.1/lib/default/commons-pool-1.3.jar
/opt/osmosis/osmosis-0.35.1/lib/default/jpf-1.5.jar
/opt/osmosis/osmosis-0.35.1/lib/default/mysql-connector-java-5.1.10.jar
/opt/osmosis/osmosis-0.35.1/lib/default/plexus-classworlds-2.2.2.jar
/opt/osmosis/osmosis-0.35.1/lib/default/postgis-jdbc-1.3.3.jar
/opt/osmosis/osmosis-0.35.1/lib/default/postgresql-8.3-603.jdbc4.jar
/opt/osmosis/osmosis-0.35.1/lib/default/spring-beans-2.5.6.SEC01.jar
/opt/osmosis/osmosis-0.35.1/lib/default/spring-context-2.5.6.SEC01.jar
/opt/osmosis/osmosis-0.35.1/lib/default/spring-core-2.5.6.SEC01.jar
/opt/osmosis/osmosis-0.35.1/lib/default/spring-jdbc-2.5.6.SEC01.jar
/opt/osmosis/osmosis-0.35.1/lib/default/spring-tx-2.5.6.SEC01.jar
/opt/osmosis/osmosis-0.35.1/lib/default/stax2-api-3.0.1.jar
/opt/osmosis/osmosis-0.35.1/lib/default/woodstox-core-lgpl-4.0.3.jar
/opt/osmosis/osmosis-0.35.1/lib/default/xercesImpl-2.9.1.jar


Using the prebuilt osmosis with java-dev/classworlds is fine:
java -cp /usr/share/classworlds-1/lib/classworlds.jar -Dapp.hom
e=/opt/osmosis/osmosis-0.35.1/ -Dclassworlds.conf=/opt/osmosis/osmosis-0.35.1/config/plexus.conf org.codehaus.classworlds.Launcher


hope that helps
Comment 7 Mitja Kleider 2010-07-08 12:21:14 UTC
I am not sure if this is the right way to launch osmosis, maybe someone could comment on it.

CLASSPATH="${CLASSPATH}:$(java-config --classpath classworlds-1)" java -Dclassworlds.conf=osmosis.conf org.codehaus.classworlds.Launcher

osmosis.conf needs to have this content:
---------- snip ----------
main is org.openstreetmap.osmosis.core.Osmosis from osmosis.core

[osmosis.core]
load /path/to/.../$dependency.jar
load /usr/share/osmosis/lib/osmosis.jar
---------- snap ----------

All paths for this config file can be obtained as in this example:
java-config --classpath osmosis


I did not figure out the Gentoo names of the dependencies listed in comment #6 yet.

java-config --list-available-packages
shows some of them, but I think there are dependencies missing in this ebuild.
Comment 8 Michael Spreng 2010-07-12 12:42:47 UTC
Sorry for taking so long to respond.

Yes there are definitely dependencies missing. For example commons-compress-1.0.jar, which I couldn't find in the portage tree

I could run osmosis with the commandline suggested in comment #7 with following osmosis.conf:
---------- snip ----------
main is org.openstreetmap.osmosis.core.Osmosis from osmosis.core

[osmosis.core]
load /usr/share/jpf-1.5/lib/jpf.jar
load /usr/share/commons-logging/lib/commons-logging.jar
load /usr/share/osmosis/lib/osmosis.jar
load /usr/share/classworlds-1/lib/classworlds.jar
load /usr/share/aopalliance-1/lib/aopalliance.jar
load /usr/share/commons-codec/lib/commons-codec.jar

load /home/[...]/osmosis-0.35.1/lib/default/commons-compress-1.0.jar
---------- snap ----------

the last entry points to a library which was downloaded by ivy, the one I couldn't find in portage.

Also a problem would be, how to get these path names reliably during compile or runtime in gentoo.
Comment 9 Mitja Kleider 2010-07-12 13:58:37 UTC
I can confirm the osmosis.conf in comment #8.

I will attach a script to generate the configuration, it might be used at runtime (maybe it is too slow, will the paths ever change?).
The dependecy dev-java/commons-compress is missing (bug #172791), there is a static path in the script for now.
Comment 10 Mitja Kleider 2010-07-12 13:59:43 UTC
Created attachment 238443 [details]
script to create osmosis.conf
Comment 11 Tomáš Chvátal (RETIRED) gentoo-dev 2011-07-18 07:05:27 UTC
Guys does the osmosis 0.35.1 that i added to main tree work for you?

I am not exactly fond of java ebuild processes or packaging java things so i cant exactly ensure that it will work peachy :(
Comment 12 Petr Morávek 2011-07-27 19:21:14 UTC
(In reply to comment #11)
> Guys does the osmosis 0.35.1 that i added to main tree work for you?

Well, I'm currently using binary package of latest version (0.39), because I need the ability to read/write pbf files. 0.35.1 is pretty old, it would be great to get the portage ebuilds up to date.
Comment 13 cruzki 2011-10-06 18:15:50 UTC
No, actual ebuild did not work. The error is:

06-oct-2011 20:13:42 org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.35.1
06-oct-2011 20:13:42 org.openstreetmap.osmosis.core.Osmosis main
GRAVE: Execution aborted.
java.lang.NoClassDefFoundError: org/java/plugin/JpfException
        at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:73)
        at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:30)
Caused by: java.lang.ClassNotFoundException: org.java.plugin.JpfException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Comment 14 Michael Spreng 2012-01-07 11:41:10 UTC
(In reply to comment #11)
> Guys does the osmosis 0.35.1 that i added to main tree work for you?
I think it's on the right way, but the loading mechanism does not work for me either.
Same error as cruzki reported

I tried to add jpf as a dependency, and added java-pkg_register-dependency jpf-1.5 to the ebuild, but the error stays there.

The problem is that somosis is oriented towards "working out of the box" for people who checkout the git repo. So ivy downloads all the necessary dependencies. Something which has to be done exactly the other way round for a distribution.

Also comment from the developer: http://lists.openstreetmap.org/pipermail/osmosis-dev/2011-November/001153.html

"If you want to create a distribution specific build for Osmosis you won't
be able to use the existing ant build, it is highly coupled to the Ivy
dependency management framework which downloads dependent jar files from
the Internet."
Comment 15 Jeroen Roovers (RETIRED) gentoo-dev 2013-05-19 13:45:46 UTC
*** Bug 470586 has been marked as a duplicate of this bug. ***
Comment 16 Jeroen Roovers (RETIRED) gentoo-dev 2013-05-19 13:45:55 UTC
*** Bug 402945 has been marked as a duplicate of this bug. ***
Comment 17 Jeroen Roovers (RETIRED) gentoo-dev 2013-05-19 13:47:16 UTC
*osmosis-0.35.1 (01 Jun 2011)

  01 Jun 2011; Tomáš Chvátal <scarabeus@gentoo.org> +osmosis-0.35.1.ebuild,
  -osmosis-0.39.ebuild:
  Downgrade to 0.35.1 which is latest source release upstream made.