NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I’ve been following the instructions found here.

http://wiki.openstreetmap.org/wiki/Osmosis/PostGIS_Setup

There have been some problems so I’ve had to grab updated versions of files, but when I try to import the iowa highway osm it gives me the this.

 user@osgeolive:~/osmosis-0.31/bin$ ./osmosis —read-xml file=“/home/user/Downloa ds/iowa.osm.highway.bz2” —write-pgsql user=“osm” database=“osm” password=“osm”
 Apr 6, 2011 3:51:18 PM org.openstreetmap.osmosis.core.Osmosis run
 INFO: Osmosis Version 0.31
 Apr 6, 2011 3:51:20 PM org.openstreetmap.osmosis.core.Osmosis run
 INFO: Preparing pipeline.
 Apr 6, 2011 3:51:20 PM org.openstreetmap.osmosis.core.Osmosis run
 INFO: Launching pipeline execution.
 Apr 6, 2011 3:51:20 PM org.openstreetmap.osmosis.core.Osmosis run
 INFO: Pipeline executing, waiting for completion.
 Apr 6, 2011 3:51:20 PM org.openstreetmap.osmosis.core.pipeline.common.ActiveTask Manager waitForCompletion
 SEVERE: Thread for task 1-read-xml failed
 org.openstreetmap.osmosis.core.OsmosisRuntimeException: The database schema vers ion of 6 does not match the expected version of 4.
 at org.openstreetmap.osmosis.core.pgsql.common.SchemaVersionValidator.va lidateDBVersion(SchemaVersionValidator.java:82)
 at org.openstreetmap.osmosis.core.pgsql.common.SchemaVersionValidator.va lidateVersion(SchemaVersionValidator.java:52)
 at org.openstreetmap.osmosis.core.pgsql.v0_6.PostgreSqlWriter.initialize (PostgreSqlWriter.java:242)
 at org.openstreetmap.osmosis.core.pgsql.v0_6.PostgreSqlWriter.process(Po stgreSqlWriter.java:902)
 at org.openstreetmap.osmosis.core.xml.v0_6.impl.NodeElementProcessor.end (NodeElementProcessor.java:109)
 at org.openstreetmap.osmosis.core.xml.v0_6.impl.OsmHandler.endElement(Os mHandler.java:108)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endEleme nt(AbstractSAXParser.java:604)
 at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser. emptyElement(AbstractXMLDocumentParser.java:183)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp l.scanStartElement(XMLDocumentFragmentScannerImpl.java:1320)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp l$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2732)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(X MLDocumentScannerImpl.java:625)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp l.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X ML11Configuration.java:812)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X ML11Configuration.java:741)
 at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser. java:123)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Ab stractSAXParser.java:1208)
 at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.p arse(SAXParserImpl.java:525)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:392)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
 at org.openstreetmap.osmosis.core.xml.v0_6.XmlReader.run(XmlReader.java: 108)
 at java.lang.Thread.run(Thread.java:636)
 Apr 6, 2011 3:51:20 PM org.openstreetmap.osmosis.core.Osmosis main
 SEVERE: Execution aborted.
 org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more tasks failed .
 at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForComple tion(Pipeline.java:146)
 at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:85)
 at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:30)
 user@osgeolive:~/osmosis-0.31/bin$ The database schema vers ion of 6 does not match the expected version of 4.
 No command ‘The’ found, did you mean:
 Command ‘the’ from package ‘the’ (universe)
 The: command not found
 user@osgeolive:~/osmosis-0.31/bin$ ^C
 user@osgeolive:~/osmosis-0.31/bin$

asked 08 Apr '11, 06:29

jmuel's gravatar image

jmuel
1111
accept rate: 0%

edited 17 Jan '15, 19:21

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


First this is a help forum, not a place for debugging specific installations. In future please use IRC, the forum or one of the mailing lists.

Second read the error message "SEVERE: Thread for task 1-read-xml failed org.openstreetmap.osmosis.core.OsmosisRuntimeException: The database schema vers ion of 6 does not match the expected version of 4. at org.openstreetmap.osmosis.core.pgsql.common.SchemaVersionValidator.va lidateDBVersion(SchemaVersionValidator.java:82) at"

You look to be using a very old version of osmosis (IIRC 0.31 is about 2 years old) with an out-of-date simple Postgres database schema. The schema has changed significantly and must be kept in step with the relevant version of Osmosis (the schema DDL is usually in a sub-directory of any osmosis distribution). The --wp task checks that the currently supported schema matches a value in a table on the database, and this seems to be the root of the error message.

I would suggest that a) you upgrade to the current version of Osmosis (0.38), b) install hstore on your Postgres database, and c) replace the schema with the current version.

Carry out a few simple tests, before trying with a large file: can you create a copy of an OSM XML file, can you import and empty OSM XML file into a database etc. If you filter out the info lines from the Java exception its easier to get to the core of the problem.

permanent link

answered 08 Apr '11, 09:11

SK53's gravatar image

SK53 ♦
28.1k48268433
accept rate: 22%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×293
×252
×30
×16

question asked: 08 Apr '11, 06:29

question was seen: 11,566 times

last updated: 17 Jan '15, 19:21

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum