开发者社区> 问答> 正文

1.13一个mysql,多个库投递到不同topic报错

DB1和DB2 都在一个mysql里,为什么我db2投递会报如下错 2019-04-25 10:36:26.026 [pool-5-thread-6] ERROR com.alibaba.otter.canal.server.CanalMQStarter - null java.lang.NullPointerException: null at com.alibaba.otter.canal.common.MQMessageUtils.messagePartition(MQMessageUtils.java:407) ~[canal.server-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.kafka.CanalKafkaProducer.send(CanalKafkaProducer.java:163) ~[canal.server-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.kafka.CanalKafkaProducer.send(CanalKafkaProducer.java:94) ~[canal.server-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.server.CanalMQStarter.worker(CanalMQStarter.java:179) [canal.server-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.server.CanalMQStarter.access$500(CanalMQStarter.java:22) [canal.server-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.server.CanalMQStarter$CanalMQRunnable.run(CanalMQStarter.java:221) [canal.server-1.1.3-SNAPSHOT.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_80] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_80] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80] 2019-04-25 10:36:26.026 [pool-5-thread-6] ERROR com.alibaba.otter.canal.server.CanalMQStarter - null java.lang.NullPointerException: null at com.alibaba.otter.canal.common.MQMessageUtils.messagePartition(MQMessageUtils.java:407) ~[canal.server-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.kafka.CanalKafkaProducer.send(CanalKafkaProducer.java:163) ~[canal.server-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.kafka.CanalKafkaProducer.send(CanalKafkaProducer.java:94) ~[canal.server-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.server.CanalMQStarter.worker(CanalMQStarter.java:179) [canal.server-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.server.CanalMQStarter.access$500(CanalMQStarter.java:22) [canal.server-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.server.CanalMQStarter$CanalMQRunnable.run(CanalMQStarter.java:221) [canal.server-1.1.3-SNAPSHOT.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_80] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_80] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80] 2019-04-25 10:36:48.546 [pool-5-thread-6] ERROR com.alibaba.otter.canal.server.CanalMQStarter - null java.lang.NullPointerException: null at com.alibaba.otter.canal.common.MQMessageUtils.messagePartition(MQMessageUtils.java:407) ~[canal.server-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.kafka.CanalKafkaProducer.send(CanalKafkaProducer.java:163) ~[canal.server-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.kafka.CanalKafkaProducer.send(CanalKafkaProducer.java:94) ~[canal.server-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.server.CanalMQStarter.worker(CanalMQStarter.java:179) [canal.server-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.server.CanalMQStarter.access$500(CanalMQStarter.java:22) [canal.server-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.server.CanalMQStarter$CanalMQRunnable.run(CanalMQStarter.java:221) [canal.server-1.1.3-SNAPSHOT.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_80] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_80] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80] 2019-04-25 10:36:48.546 [pool-5-thread-6] ERROR com.alibaba.otter.canal.server.CanalMQStarter - null java.lang.NullPointerException: null at com.alibaba.otter.canal.common.MQMessageUtils.messagePartition(MQMessageUtils.java:407) ~[canal.server-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.kafka.CanalKafkaProducer.send(CanalKafkaProducer.java:163) ~[canal.server-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.kafka.CanalKafkaProducer.send(CanalKafkaProducer.java:94) ~[canal.server-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.server.CanalMQStarter.worker(CanalMQStarter.java:179) [canal.server-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.server.CanalMQStarter.access$500(CanalMQStarter.java:22) [canal.server-1.1.3-SNAPSHOT.jar:na] at com.alibaba.otter.canal.server.CanalMQStarter$CanalMQRunnable.run(CanalMQStarter.java:221) [canal.server-1.1.3-SNAPSHOT.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_80] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_80] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]

原提问者GitHub用户ZSH9053

展开
收起
数据大拿 2023-05-04 18:26:36 84 0
1 条回答
写回答
取消 提交回答
  • 你这代码行有点对不齐,下载最新版试试,印象中有修复过NPE问题

    原回答者GitHub用户agapple

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

相关电子书

更多
One Box: 解读事务与分析一体化数据库 HybridDB for MySQL 立即下载
One Box:解读事务与分析一体化数据库HybridDB for MySQL 立即下载
如何支撑HTAP场景-HybridDB for MySQL系统架构和技术演进 立即下载

相关镜像