开发者社区> 问答> 正文

otter4.2.15 同步point类型出错

  1. otter4.2.15 同步point类型出错 navicat查出来的结果为 location: POINT(18.7507 26.5846) mysql终端查询出来的结果为 location: �� �Jvl��]@ux 㧕:@ otter报错为

pid:6 nid:1 exception:setl:com.alibaba.otter.node.etl.load.exception.LoadException: java.util.concurrent.ExecutionException: com.alibaba.otter.node.etl.load.exception.LoadException: com.alibaba.otter.node.etl.load.exception.LoadException: com.alibaba.otter.node.etl.load.exception.LoadException: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [update ris_production.nodes set location = ? , updated_at = ? , id = ? where ( id = ? )]; Data truncation: Cannot get geometry object from data you send to the GEOMETRY field; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Cannot get geometry object from data you send to the GEOMETRY field

---Pks EventColumn[index=0,columnType=4,columnName=id,columnValue=16201,isNull=false,isKey=true,isUpdate=false] ---oldPks EventColumn[index=0,columnType=4,columnName=id,columnValue=16201,isNull=false,isKey=true,isUpdate=false] ---Columns EventColumn[index=23,columnType=1111,columnName=location,columnValue=��àJvl�°]@ux�ã§�:@,isNull=false,isKey=false,isUpdate=true] EventColumn[index=25,columnType=93,columnName=updated_at,columnValue=2018-06-07 12:28:14,isNull=false,isKey=false,isUpdate=true] ---Sql update ris_production.nodes set location = ? , updated_at = ? , id = ? where ( id = ? )

  1. 有计划适配point类型么,顺便问一下,正式的新版本计划什么时候发布,迫不及待的想用新版本了

原提问者GitHub用户chenyanter

展开
收起
古拉古拉 2023-06-16 21:13:01 49 0
2 条回答
写回答
取消 提交回答
  • 根据报错信息,看起来是由于otter无法将POINT类型的数据转换为GEOMETRY类型的数据,导致在执行update语句时报错。解决这个问题的方法,可以在同步数据前先将POINT类型的数据转换为GEOMETRY类型的数据,然后再进行同步。具体的实现方法,可以根据你的具体业务需求来进行调整。

    2023-06-17 10:18:05
    赞同 展开评论 打赏
    1. point类型没做过而是,应该需要按照byte[]进行处理
    2. 可以尝试一下4.2.16-alpha2版本,支持了point类型。ps. 需要关闭pipeline高级参数里的数据类型转换

    原回答者GitHub用户agapple

    2023-06-16 21:50:01
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载