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
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。