You are not logged in.

Announcement

*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***

#1 2009-07-24 02:58:15

kshafi
Member
Registered: 2009-07-24
Posts: 2

Windows Path Problems

Hi All,

Please excuse me for any naive queries. This is my first post to this list.

I am on a Windows XP (Home Edition) machine.
I downloaded the full version of Osmosis from "http://gweb.bretth.com/osmosis-latest.tar.gz" and uncompressed it in one of my preferred directories. Running the osmosis.bat file from the bin directory produces the following error
Exception in thread "main" java.lang.NoClassDefFoundError: and

I have tried fixing the references in the bat file as follows:


Original:
SET EXEC=%JAVACMD% %JAVACMD_OPTIONS% -cp %MYAPP_HOME%\osmosis.jar;%MYAPP_HOME%\lib\commons-logging.jar;%MYAPP_HOME%\lib\mysql-connector-java-5.0.7-bin.jar;%MYAPP_HOME%\lib\postgresql-8.3-603.jdbc4.jar;%MYAPP_HOME%\lib\postgis_1.3.2.jar;%MAINCLASS% %OSMOSIS_OPTIONS% %*

Modified:
SET EXEC=%JAVACMD% %JAVACMD_OPTIONS% -cp %MYAPP_HOME%\osmosis.jar;%MYAPP_HOME%\lib\default\commons-logging-1.0.4.jar;%MYAPP_HOME%\lib\default\mysql-connector-java-5.1.6-bin.jar;%MYAPP_HOME%\lib\default\postgresql-8.3-603.jdbc4.jar;%MYAPP_HOME%\lib\default\postgis-1.3.2.jar;%MAINCLASS% %OSMOSIS_OPTIONS% %*

I have also tried adding the class path in the environment variables. Nothing is working for me at the moment.

Also, I am aiming to extract an Australian city's data using osmosis. Any ideas on how to get the coordinates for doing such an exercise.

Offline

#2 2009-07-28 11:59:02

Harry Wood
Member
From: London UK
Registered: 2007-05-29
Posts: 147
Website

Re: Windows Path Problems

Yes I found I needed to modify that line of the bat file too, to reference the new 'default' directory.

What's the full error message?  (which class def is it not finding? )

Also see : http://forum.openstreetmap.org/viewtopic.php?id=4039

Offline

#3 2009-07-29 01:51:51

kshafi
Member
Registered: 2009-07-24
Posts: 2

Re: Windows Path Problems

Thanks Harry,

Well I got around the class not found problem by manually specifying the path but now there are other problems; osmosis is not recognizing the options. Here is the output I am getting on the commandline

C:\osmosis-0.31>java -cp \lib\default\commons-logging-1.0.4.jar;\lib\default\mysql-connector-java-5.1.6.jar;\lib\default\postgresql-8.3-603.jdbc4.jar;\lib\default\postgis-1.3.2.jar;\lib\default\jpf-1.5.jar;\lib\default\stax2-api-3.0.1.jar;\lib\default\woodstox-core-lgpl-4.0.3.jar;\lib\default\bzip2-20090327.jar -jar osmosis.jar org.openstreetmap.osmosis.core.Osmosis --rx file="planet.osm" --bp file="mypts
.txt" --wx file="mymap.osm"

29/07/2009 10:38:11 AM org.openstreetmap.osmosis.core.Osmosis main
SEVERE: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Expected argument 1 to b
e an option or task name.
        at org.openstreetmap.osmosis.core.cli.CommandLineParser.parse(CommandLin
eParser.java:94)
        at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:67)
        at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:30)

A quick response is appreciated.

Regards
KS

Offline

#4 2009-08-03 18:19:17

Harry Wood
Member
From: London UK
Registered: 2007-05-29
Posts: 147
Website

Re: Windows Path Problems

Yeah you either need "-jar osmosis.jar"  or   "org.openstreetmap.osmosis.core.Osmosis" ,   but you have both

Offline

Board footer

Powered by FluxBB