我想获取osm数据并将其放在mysql数据库中,但下面指出的错误是由渗透引起的。
我需要一个osm文件的数据来将int转换为矩阵,然后放置一个仓库区域并将用户选择的节点视为图形之类的节点,我将获得最快的有效路径来路由具有容量的车辆节点,如果车辆已满,则它将返回起始区域并卸载当前的负载,然后返回剩余的节点以获得其负载。
20-Nov-2011 15:42:45 org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskMa
nager waitForCompletion
SEVERE: Thread for task 2-buffer failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to bulk insert re
lation members into the database.
at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.flushRelationMembers
(ApidbWriter.java:895)
at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.addRelationMembers(A
pidbWriter.java:1229)
at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.flushRelations(Apidb
Writer.java:829)
at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.complete(ApidbWriter
.java:1044)
at org.openstreetmap.osmosis.core.buffer.v0_6.EntityBuffer.run(EntityBuf
fer.java:77)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: Incorrect integer value: 'Way' for column 'mem
ber_type' at row 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3558)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.ja
va:2077)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
:2362)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
:2280)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
:2265)
at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.flushRelationMembers
(ApidbWriter.java:893)
... 5 more
20-Nov-2011 15:42:45 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:92)
at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)
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
cher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:239)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
at org.codehaus.classworlds.Launcher.main(Launcher.java:31)
C:\Users\home\Desktop>
答案 0 :(得分:0)
好吧,堆栈跟踪非常明显:
Caused by: java.sql.SQLException: Incorrect integer value:
'Way' for column 'member_type' at row 1
您正尝试将字符串“Way”传递给整数列“member_type”。