Osmosis password

Hey

i downloaded osmosis 0.3.0 to a windows xp system. and i downloaded data from geofabrik.de. now i want to put the data with osmosis into a postgrsql 8.3.7.1 with postgis 1.3.6.1.
the string is

osmosis --read-xml file="\berlin.osm.bz2“ --write-pgsql host=“localhost” database=“osmdata“ user="alex“ password=“strunck“

but i got an error

C:\Programme\osmosis-0.30\bin>osmosis --read-xml file=“\berlin.osm.bz2” --write-
pgsql host=“localhost” database=“osmdata” user=“alex” password=“strunck”
17.07.2009 11:03:55 com.bretth.osmosis.core.Osmosis run
INFO: Osmosis Version 0.30
17.07.2009 11:03:55 com.bretth.osmosis.core.Osmosis run
INFO: Preparing pipeline.
17.07.2009 11:03:55 com.bretth.osmosis.core.Osmosis main
SCHWERWIEGEND: Execution aborted.
com.bretth.osmosis.core.OsmosisRuntimeException: Argument password for task 1-re
ad-xml was not recognised.
at com.bretth.osmosis.core.pipeline.common.TaskManagerFactory.createTask
Manager(TaskManagerFactory.java:64)
at com.bretth.osmosis.core.pipeline.common.Pipeline.buildTasks(Pipeline.
java:50)
at com.bretth.osmosis.core.pipeline.common.Pipeline.prepare(Pipeline.jav
a:112)
at com.bretth.osmosis.core.Osmosis.run(Osmosis.java:79)
at com.bretth.osmosis.core.Osmosis.main(Osmosis.java:30)

why does the program wants an password for reading? why doesn´t it work?

alex

If that’s the literal string you’re passing to Osmosis then it’s an encoding problem. You’ve got curly quote characters instead of "
I can’t see any other reason.

The reason Osmosis is throwing an error is that it thinks you’re still on task one (read-xml) because of the following bit:

Note curly quote. There are other curly quotes in your string too. Remove them and replace with the proper character and try again. :slight_smile:

Alex

thank you i am going to try this…

hey

i tried now i got a new problem

C:\osmosis-0.30\bin>osmosis --read-xml file=“berlin.osm” --write-pgsql host=“loc
alhost” database=“osm” user=“postgres” password=“xxx”
20.07.2009 13:04:49 com.bretth.osmosis.core.Osmosis run
INFO: Osmosis Version 0.30
20.07.2009 13:04:50 com.bretth.osmosis.core.Osmosis run
INFO: Preparing pipeline.
20.07.2009 13:04:50 com.bretth.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
20.07.2009 13:04:50 com.bretth.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
20.07.2009 13:04:50 com.bretth.osmosis.core.xml.v0_5.impl.OsmElementProcessor be
gin
WARNUNG: Expected version 0.5 but received 0.6.
20.07.2009 13:05:06 com.bretth.osmosis.core.pipeline.common.ActiveTaskManager wa
itForCompletion
SCHWERWIEGEND: Thread for task 1-read-xml failed
com.bretth.osmosis.core.OsmosisRuntimeException: Unable to bulk insert node tags
into the database.
at com.bretth.osmosis.core.pgsql.v0_5.PostgreSqlWriter.flushNodeTags(Pos
tgreSqlWriter.java:594)
at com.bretth.osmosis.core.pgsql.v0_5.PostgreSqlWriter.addNodeTags(Postg
reSqlWriter.java:568)
at com.bretth.osmosis.core.pgsql.v0_5.PostgreSqlWriter.flushNodes(Postgr
eSqlWriter.java:529)
at com.bretth.osmosis.core.pgsql.v0_5.PostgreSqlWriter.process(PostgreSq
lWriter.java:1033)
at com.bretth.osmosis.core.container.v0_5.NodeContainer.process(NodeCont
ainer.java:58)
at com.bretth.osmosis.core.pgsql.v0_5.PostgreSqlWriter.process(PostgreSq
lWriter.java:1014)
at com.bretth.osmosis.core.xml.v0_5.impl.NodeElementProcessor.end(NodeEl
ementProcessor.java:103)
at com.bretth.osmosis.core.xml.v0_5.impl.OsmHandler.endElement(OsmHandle
r.java:109)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endEleme
nt(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.
emptyElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(U
nknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(U
nknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(U
nknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown So
urce)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Un
known Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.p
arse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at com.bretth.osmosis.core.xml.v0_5.XmlReader.run(XmlReader.java:109)
at java.lang.Thread.run(Unknown Source)
Caused by: org.postgresql.util.PSQLException: ERROR: character 0xd0af of encodin
g “UTF8” has no equivalent in “WIN1252”
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryEx
ecutorImpl.java:1592)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutor
Impl.java:1327)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.ja
va:192)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stat
ement.java:451)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(Abstract
Jdbc2Statement.java:350)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdb
c2Statement.java:304)
at com.bretth.osmosis.core.pgsql.v0_5.PostgreSqlWriter.flushNodeTags(Pos
tgreSqlWriter.java:592)
… 22 more
20.07.2009 13:05:06 com.bretth.osmosis.core.Osmosis main
SCHWERWIEGEND: Execution aborted.
com.bretth.osmosis.core.OsmosisRuntimeException: One or more tasks failed.
at com.bretth.osmosis.core.pipeline.common.Pipeline.waitForCompletion(Pi
peline.java:146)
at com.bretth.osmosis.core.Osmosis.run(Osmosis.java:85)
at com.bretth.osmosis.core.Osmosis.main(Osmosis.java:30)

what can i do?? i don´t understand the problem?

alex

Hey thx that help, i got now the connection to the database but now there is the problem with the nodes

C:\osmosis-0.30\bin>osmosis --read-xml file=berlin.osm --write-pgsql host=“local
host” database=“simpel” user=“alex” password=“strunck”
21.07.2009 11:07:14 com.bretth.osmosis.core.Osmosis run
INFO: Osmosis Version 0.30
21.07.2009 11:07:14 com.bretth.osmosis.core.Osmosis run
INFO: Preparing pipeline.
21.07.2009 11:07:14 com.bretth.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
21.07.2009 11:07:14 com.bretth.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
21.07.2009 11:07:14 com.bretth.osmosis.core.xml.v0_5.impl.OsmElementProcessor be
gin
WARNUNG: Expected version 0.5 but received 0.6.
21.07.2009 11:07:20 com.bretth.osmosis.core.pipeline.common.ActiveTaskManager wa
itForCompletion
SCHWERWIEGEND: Thread for task 1-read-xml failed
com.bretth.osmosis.core.OsmosisRuntimeException: Unable to bulk insert node tags
into the database.

at com.bretth.osmosis.core.pgsql.v0_5.PostgreSqlWriter.flushNodeTags(Pos
tgreSqlWriter.java:594)
at com.bretth.osmosis.core.pgsql.v0_5.PostgreSqlWriter.addNodeTags(Postg
reSqlWriter.java:568)
at com.bretth.osmosis.core.pgsql.v0_5.PostgreSqlWriter.flushNodes(Postgr
eSqlWriter.java:529)
at com.bretth.osmosis.core.pgsql.v0_5.PostgreSqlWriter.process(PostgreSq
lWriter.java:1033)
at com.bretth.osmosis.core.container.v0_5.NodeContainer.process(NodeCont
ainer.java:58)
at com.bretth.osmosis.core.pgsql.v0_5.PostgreSqlWriter.process(PostgreSq
lWriter.java:1014)
at com.bretth.osmosis.core.xml.v0_5.impl.NodeElementProcessor.end(NodeEl
ementProcessor.java:103)
at com.bretth.osmosis.core.xml.v0_5.impl.OsmHandler.endElement(OsmHandle
r.java:109)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endEleme
nt(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.
emptyElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(U
nknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(U
nknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(U
nknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown So
urce)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Un
known Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.p
arse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at com.bretth.osmosis.core.xml.v0_5.XmlReader.run(XmlReader.java:109)
at java.lang.Thread.run(Unknown Source)
Caused by: org.postgresql.util.PSQLException: ERROR: character 0xd0af of encodin
g “UTF8” has no equivalent in “WIN1252”
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryEx
ecutorImpl.java:1592)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutor
Impl.java:1327)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.ja
va:192)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stat
ement.java:451)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(Abstract
Jdbc2Statement.java:350)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdb
c2Statement.java:304)
at com.bretth.osmosis.core.pgsql.v0_5.PostgreSqlWriter.flushNodeTags(Pos
tgreSqlWriter.java:592)
… 22 more
21.07.2009 11:07:20 com.bretth.osmosis.core.Osmosis main
SCHWERWIEGEND: Execution aborted.
com.bretth.osmosis.core.OsmosisRuntimeException: One or more tasks failed.
at com.bretth.osmosis.core.pipeline.common.Pipeline.waitForCompletion(Pi
peline.java:146)
at com.bretth.osmosis.core.Osmosis.run(Osmosis.java:85)
at com.bretth.osmosis.core.Osmosis.main(Osmosis.java:30)

I’m afraid I don’t know what would cause that error. Have you checked that your database user account has the correct privileges?