开发者社区> 问答> 正文

ddl新增字段异常:com.mysql.jdbc.exceptions.jdbc4.MySQLSyn

前提:配置了多个channel,各个channel的源表都是同一张表,目标表是另一个集群的同一个库的不同表。 mysql5.7.20,canal:1.0.26,ddl新增字段报错如下:

2018-06-26 15:02:25.895 [pipelineId = 15,taskName = LoadWorker] ERROR com.alibaba.otter.node.etl.load.LoadTask - [15] loadWork executor is error! data:EtlEventData[currNid=8,nextNid=8,desc=[MemoryPipeKey[identity=Identity[channelId=15,pipelineId=15,processId=89],time=1529996545875,dataType=DB_BATCH]],processId=89,startTime=1529996545271,endTime=,firstTime=1529996545000,batchId=6,number=1,size=,exts=,pipelineId=15] 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: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column name 'name2' Caused by: java.util.concurrent.ExecutionException: com.alibaba.otter.node.etl.load.exception.LoadException: com.alibaba.otter.node.etl.load.exception.LoadException: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column name 'name2' at java.util.concurrent.FutureTask.report(FutureTask.java:122) [na:1.8.0_102] at java.util.concurrent.FutureTask.get(FutureTask.java:192) [na:1.8.0_102] at com.alibaba.otter.node.etl.load.loader.db.DataBatchLoader.load(DataBatchLoader.java:107) ~[node.etl-4.2.16-SNAPSHOT.jar:na] at com.alibaba.otter.node.etl.load.loader.OtterLoaderFactory.load(OtterLoaderFactory.java:50) ~[node.etl-4.2.16-SNAPSHOT.jar:na] at com.alibaba.otter.node.etl.load.LoadTask$1.run(LoadTask.java:85) ~[node.etl-4.2.16-SNAPSHOT.jar:na] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_102] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_102] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102] Caused by: com.alibaba.otter.node.etl.load.exception.LoadException: com.alibaba.otter.node.etl.load.exception.LoadException: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column name 'name2' Caused by: com.alibaba.otter.node.etl.load.exception.LoadException: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column name 'name2'

原提问者GitHub用户nycle

展开
收起
绿子直子 2023-05-09 10:13:42 59 0
1 条回答
写回答
取消 提交回答
  • 估计重复执行了DDL,忽略掉当前的DDL异常可跳过

    原回答者GitHub用户agapple

    2023-05-10 09:26:24
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
搭建电商项目架构连接MySQL 立即下载
搭建4层电商项目架构,实战连接MySQL 立即下载
PolarDB MySQL引擎重磅功能及产品能力盛大发布 立即下载

相关镜像