Opened 4 years ago

#3680 new defect

Fails to update relations from osc file

Reported by: ieskok Owned by: brett@…
Priority: major Milestone:
Component: osmosis Version:
Keywords: Cc:

Description

There is two osm files - A & B. Using osmosis i made changeset(osc) file from A to B. Then i populated file A to mysql DB.
When i trying to apply changeset file to DB with option --write-db-change Osmosis produces exception:

org.openstreetmap.osmosis.core.OsmosisRuntimeException?: Unable to insert history relation with id=79897.

at org.openstreetmap.osmosis.apidb.v0_6.impl.ChangeWriter?.write(ChangeWriter?.java:899)
at org.openstreetmap.osmosis.apidb.v0_6.impl.ActionChangeWriter?.process(ActionChangeWriter?.java:64)
at org.openstreetmap.osmosis.core.container.v0_6.RelationContainer?.process(RelationContainer?.java:60)
at org.openstreetmap.osmosis.apidb.v0_6.ApidbChangeWriter?.process(ApidbChangeWriter?.java:67)
at org.openstreetmap.osmosis.xml.v0_6.impl.ChangeSourceElementProcessor?$ChangeSinkAdapter?.process(ChangeSourceElementProcessor?.java:134)
at org.openstreetmap.osmosis.xml.v0_6.impl.RelationElementProcessor?.end(RelationElementProcessor?.java:116)
at org.openstreetmap.osmosis.xml.v0_6.impl.OsmChangeHandler?.endElement(OsmChangeHandler?.java:94)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher?.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
at org.openstreetmap.osmosis.xml.v0_6.XmlChangeReader?.run(XmlChangeReader?.java:107)
at java.lang.Thread.run(Thread.java:636)

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '79897-5' for key 'PRIMARY'......

Both files is ordered by type then by id. Change file was tested with streamable & seekable type sorts.

Change History (0)

Note: See TracTickets for help on using tickets.