[OSM-dev] Importing planet.osm into api0.5 db?

Jon Bright jon at siliconcircus.com
Thu Oct 4 09:11:15 BST 2007


Hi Brett,

Brett Henderson wrote:
> 
> I haven't released a new version of osmosis but it is all available in 
> svn if you wish to compile it yourself.  Just run ant in the 
> applications/utils/osmosis directory.

I've done this and then set it running on the 0.5 planet, thus:

java -jar osmosis.jar --read-xml-0.5 file="planet-api05-070927.osm" 
--write-mysql-0.5 host="..." database="..." user="..." password="..."

I see this exception:

Exception in thread "Thread-1-read-xml-0.5" 
com.bretth.osmosis.core.OsmosisRuntimeException: Unable to bulk insert 
nodes into the database.
         at 
com.bretth.osmosis.core.mysql.v0_5.MysqlWriter.flushNodes(MysqlWriter.java:551)
         at 
com.bretth.osmosis.core.mysql.v0_5.MysqlWriter.process(MysqlWriter.java:1006)
         at 
com.bretth.osmosis.core.container.v0_5.NodeContainer.process(NodeContainer.java:34)
         at 
com.bretth.osmosis.core.mysql.v0_5.MysqlWriter.process(MysqlWriter.java:986) 
                                                  at 
com.bretth.osmosis.core.xml.v0_5.impl.NodeElementProcessor.end(NodeElementProcessor.java:99) 
                                  at 
com.bretth.osmosis.core.xml.v0_5.impl.OsmHandler.endElement(OsmHandler.java:108) 

...
Caused by: java.sql.SQLException: Incorrect string value: 
'\xD8\xAE\xD8\xB1\xD9\x8A...' for column 'tags' at row 1 
        ...
at 
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1303) 
                                                   at 
com.bretth.osmosis.core.mysql.v0_5.MysqlWriter.flushNodes(MysqlWriter.java:549) 


Any idea what that might be?

-- 
Jon Bright
Silicon Circus Ltd.
http://www.siliconcircus.com




More information about the dev mailing list