[OSM-dev] osmosis not handling empty command line values

Stadin, Benjamin Benjamin.Stadin at heidelberg-mobil.com
Sun Jun 5 23:31:55 UTC 2016


Hi,

I¹m following the import example from [1] with a small extract:

osmosis --read-pbf ka.pbf \
  --write-apidb host="localhost" database="openstreetmap" \
  user="openstreetmap" password="" validateSchemaVersion="no"


But this throws an error:
SEVERE: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Argument 7 doesn't
contain a value after the '=' (ie. name=value).
	at 
org.openstreetmap.osmosis.core.cli.CommandLineParser.parseTask(CommandLineP
arser.java:281)

The 7th argument is the password argument. When I remove that argument,
osmosis doesn¹t complain but fails to connect to the db.


The osmosis version I use is a prebuilt v0.45 from here:
http://bretth.dev.openstreetmap.org/osmosis-build/osmosis-latest.tgz

I wasn¹t able yet to compile it from sources (I¹ve Ubuntu 16.04 and Oracle
Java 8 - according to the compile errors I guess Java 7 would be better to
build the package).

I didn¹t look into the code, but it seems the "" is not treated as an
empty string but eliminated in the course.

Best
Ben

[1] 
https://github.com/openstreetmap/openstreetmap-website/blob/master/CONFIGUR
E.md




More information about the dev mailing list