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

I am trying to export an OSM file to a MySQL database. The syntax am am using is:

osmosis --read-xml file="d:/geo/maniu.osm" --write-apidb populateCurrentTables=yes dbType="mysql" host="localhost" database="geo" user="root"

I get this error:

D:\Geo\osmosis\bin>osmosis --read-xml file="d:/geo/maniu.osm" --write-apidb popu lateCurrentTables=yes dbType="mysql" host="localhost" database="geo" user="root" 04.07.2012 22:32:29 org.openstreetmap.osmosis.core.Osmosis run INFO: Osmosis Version 0.40.1 04.07.2012 22:32:29 org.openstreetmap.osmosis.core.Osmosis run INFO: Preparing pipeline. 04.07.2012 22:32:29 org.openstreetmap.osmosis.core.Osmosis run INFO: Launching pipeline execution. 04.07.2012 22:32:29 org.openstreetmap.osmosis.core.Osmosis run INFO: Pipeline executing, waiting for completion. 04.07.2012 22:32:29 org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskMan ager waitForCompletion SEVERE: Thread for task 1-read-xml failed org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to create results et. at org.openstreetmap.osmosis.apidb.common.DatabaseContext.executeQuery(D at org.openstreetmap.osmosis.apidb.v0_6.impl.SchemaVersionValidator.vali dateDBVersion( at org.openstreetmap.osmosis.apidb.v0_6.impl.SchemaVersionValidator.vali dateVersion( at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.initialize(ApidbWrit at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.process(ApidbWriter. java:1080) at org.openstreetmap.osmosis.xml.v0_6.impl.NodeElementProcessor.end(Node at org.openstreetmap.osmosis.xml.v0_6.impl.OsmHandler.endElement(OsmHand at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source ) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unkn own Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen t(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent Dispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un known 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 Sour ce) at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at at Source) Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'geo .schema_migrations' doesn't exist at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou rce) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mysql.jdbc.Util.handleNewInstance( at com.mysql.jdbc.Util.getInstance( at com.mysql.jdbc.SQLError.createSQLException( at com.mysql.jdbc.MysqlIO.checkErrorPacket( at com.mysql.jdbc.MysqlIO.checkErrorPacket( at com.mysql.jdbc.MysqlIO.sendCommand( at com.mysql.jdbc.MysqlIO.sqlQueryDirect( at com.mysql.jdbc.ConnectionImpl.execSQL( at com.mysql.jdbc.ConnectionImpl.execSQL( at com.mysql.jdbc.StatementImpl.executeQuery( at org.openstreetmap.osmosis.apidb.common.DatabaseContext.executeQuery(D ... 20 more 04.07.2012 22:32:29 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( at at org.openstreetmap.osmosis.core.Osmosis.main( at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Laun at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav a:239) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La at org.codehaus.plexus.classworlds.launcher.Launcher.main( 352) at org.codehaus.classworlds.Launcher.main(

So, am I doing something wrong? I have a database structure that I downloaded from here:

Thank you!

asked 04 Jul '12, 20:39

Alexandru's gravatar image

accept rate: 0%

The error message is Table 'geo.schema_migrations' doesn't exist. This is a table that contains the version information of the schema. It is important that your schema is the one that osmosis is expecting.

MySQL is no longer supported by the rails port so there is no way to get a current schema for MySQL, on the other hand you would not need it for anything. You could pass validateSchemaVersion=no to osmosis to prevent it from checking the version, however that can cause an error in the process or the result.

permanent link

answered 04 Jul '12, 21:43

Gnonthgol's gravatar image

Gnonthgol ♦
accept rate: 16%

I have the same problem. Its a brick wall for me using osmosis. I tried setting validateSchemaVersion=no and still does not work. bummer

(19 Dec '18, 19:53) Ant

@Ant: what about using PostgreSQL instead?

(20 Dec '18, 20:40) aseerel4c26 ♦

aseerel4c26 I am integrating the data into an existing mariadb database and I am more familiar with mariadb. Maybe I could go from PostgreSQL to mariadb.

(21 Dec '18, 02:10) Ant

@Ant: I'd be surprised if anyone is using the MySQL features of Osmosis now. They effectively became redundant 10 years ago & are maintained for backward compatibility. I suspect it will be difficult to find someone with contemporary knowledge, but also piggy-backing of an old question is not the way to do it.

(22 Dec '18, 22:50) SK53 ♦

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 04 Jul '12, 20:39

question was seen: 21,893 times

last updated: 22 Dec '18, 22:50

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