[OSM-dev] osmosis problem with truncate
Stephan Knauss
osm at stephans-server.de
Tue Sep 22 20:30:28 BST 2009
Hi,
is this a bug or am I using it wrong? Sporadically osmosis throws an
exception. I do not understand the reason because I wanted to clear the
db before an import using the truncate task.
Osmosis is called like this:
osmosis --truncate-pgsql database=db user=pg --fast-read-xml-0.6
file=f.osm --buffer --write-pgsql user=pg database=db
and throws this exception:
22.09.2009 07:42:08
org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager
waitForCompletion
SCHWERWIEGEND: Thread for task 3-buffer failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to
execute statement.
at
org.openstreetmap.osmosis.core.pgsql.common.DatabaseContext.executeStatement(DatabaseContext.java:106)
at
org.openstreetmap.osmosis.core.pgsql.v0_6.PostgreSqlWriter.complete(PostgreSqlWriter.java:862)
at
org.openstreetmap.osmosis.core.buffer.v0_6.EntityBuffer.run(EntityBuffer.java:77)
at java.lang.Thread.run(Unknown Source)
Caused by: org.postgresql.util.PSQLException: ERROR: could not create
unique index "pk_users"
Detail: Table contains duplicated values.
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1592)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1327)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:192)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:336)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:328)
at
org.openstreetmap.osmosis.core.pgsql.common.DatabaseContext.executeStatement(DatabaseContext.java:103)
... 3 more
22.09.2009 07:42:08 org.openstreetmap.osmosis.core.Osmosis main
SCHWERWIEGEND: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more
tasks failed.
at
org.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForCompletion(Pipeline.java:146)
at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:85)
at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:30)
Stephan
More information about the dev
mailing list