开发者社区> 问答> 正文

canal-adapter v1.1.4版本中,如果表字段是status会同步失败,报错java.l

canal-adapter v1.1.4版本中,如果表字段是status会同步失败,报错java.lang.IllegalArgumentException:

2020-04-15 16:45:47.915 [pool-3-thread-1] ERROR c.a.o.canal.adapter.launcher.loader.CanalAdapterWorker - java.lang.IllegalArgumentException: cannot write xcontent for unknown value of type class java.math.BigInteger java.lang.RuntimeException: java.lang.IllegalArgumentException: cannot write xcontent for unknown value of type class java.math.BigInteger at com.alibaba.otter.canal.client.adapter.es.service.ESSyncService.sync(ESSyncService.java:110) at com.alibaba.otter.canal.client.adapter.es.service.ESSyncService.sync(ESSyncService.java:58) at com.alibaba.otter.canal.client.adapter.es.ESAdapter.sync(ESAdapter.java:169) at com.alibaba.otter.canal.client.adapter.es.ESAdapter.sync(ESAdapter.java:148) at com.alibaba.otter.canal.adapter.launcher.loader.AbstractCanalAdapterWorker.batchSync(AbstractCanalAdapterWorker.java:201) at com.alibaba.otter.canal.adapter.launcher.loader.AbstractCanalAdapterWorker.lambda$null$1(AbstractCanalAdapterWorker.java:62) at java.util.ArrayList.forEach(ArrayList.java:1257) at com.alibaba.otter.canal.adapter.launcher.loader.AbstractCanalAdapterWorker.lambda$null$2(AbstractCanalAdapterWorker.java:58) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.IllegalArgumentException: cannot write xcontent for unknown value of type class java.math.BigInteger at org.elasticsearch.common.xcontent.XContentBuilder.unknownValue(XContentBuilder.java:755) at org.elasticsearch.common.xcontent.XContentBuilder.map(XContentBuilder.java:810) at org.elasticsearch.common.xcontent.XContentBuilder.map(XContentBuilder.java:792) at org.elasticsearch.action.index.IndexRequest.source(IndexRequest.java:312) at org.elasticsearch.action.index.IndexRequest.source(IndexRequest.java:301) at org.elasticsearch.action.update.UpdateRequest.doc(UpdateRequest.java:555) at com.alibaba.otter.canal.client.adapter.es.support.ESConnection$ESUpdateRequest.setDoc(ESConnection.java:222) at com.alibaba.otter.canal.client.adapter.es.support.ESTemplate.insert(ESTemplate.java:74) at com.alibaba.otter.canal.client.adapter.es.service.ESSyncService.singleTableSimpleFiledInsert(ESSyncService.java:442) at com.alibaba.otter.canal.client.adapter.es.service.ESSyncService.insert(ESSyncService.java:133) at com.alibaba.otter.canal.client.adapter.es.service.ESSyncService.sync(ESSyncService.java:93) ... 11 common frames omitted

贴出这个错误,具体原因未知。把字段名status改为其他名称一切正常了

原提问者GitHub用户wareon

展开
收起
Java工程师 2023-05-03 10:40:51 115 0
1 条回答
写回答
取消 提交回答
  • 看错误是因为es不支持BigInteger类型,可能是es版本低了

    原回答者GitHub用户Hueason

    2023-05-04 14:44:09
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Spring Cloud Alibaba - 重新定义 Java Cloud-Native 立即下载
The Reactive Cloud Native Arch 立即下载
JAVA开发手册1.5.0 立即下载