[osmosis-dev] extracting data in a polygon

Brett Henderson brett at bretth.com
Tue Mar 30 10:25:03 BST 2010


On Tue, Mar 30, 2010 at 10:04 AM, Nakor <nakor.osm at gmail.com> wrote:

> On 03/28/2010 09:28 PM, Brett Henderson wrote:
>
>>
>>    osmosis --read-xml enableDateParsing=no file="MI_limits_merged.osm"
>>    --bounding-polygon file="mi_poly.txt" --write-xml file="michigan.osm"
>>
>>    and am getting the following error message:
>>
>>    SEVERE: Thread for task 1-read-xml failed
>>    java.lang.NoClassDefFoundError:
>>    org.openstreetmap.osmosis.core.filter.common.PolygonFileReader
>>        at java.lang.Class.initializeClass(libgcj.so.10)
>>    [...]
>>    Caused by: java.lang.ClassNotFoundException:
>> java.awt.geom.Path2D$Double
>>        at
>>
>>  org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
>>    [...]
>>
>>    What am I doing wrong?
>>
>>
>  Can you give some more details about your installation?  OS version,
>> Java version (ie. "java -version" output), Osmosis version, etc.
>>
>
> I am running Fedora 12 on a 64bit processor
>
> $ java -version
> java version "1.6.0_18"
> Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
> Java HotSpot(TM) 64-Bit Server VM (build 16.0-b13, mixed mode)
>
> INFO: Osmosis Version 0.34
>
> Note that extracting with a bounding box works correctly here.
>

A few things appear strange to me.

   - I'm also running Fedora 12 (albeit 32-bit) and don't have the same
   issue.
   - I don't think you're using the java version you think you are.  I
   notice that the stack trace refers to "libgcj.so.10".  To the best of my
   knowledge that library is not used by a "real" Java VM, but by the GCJ
   version of java.
   - Your version output is considerably different to mine.  Do you have the
   Fedora openjdk packages installed?  Or have you installed java manually?

Osmosis appears to be trying to run under the GCJ version of Java, and your
non-openjdk java output makes me suspect a Java installation problem.

There may be several reasons for this problem.

   - Do you have a "/etc/osmosis" or "~/.osmosis" file lying around that is
   causing an alternative java to be invoked?
   - Have you installed java manually using a download from Sun/Oracle and
   not included it on the search path?

Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20100330/4b04dd1e/attachment.html>


More information about the osmosis-dev mailing list