搭了个环境,测试了一下发现,如果目标数据源是mycat,会有如下异常,无法同步:
pid:1 nid:1 exception:setl:com.alibaba.otter.node.etl.select.exceptions.SelectException: com.google.common.collect.ComputationException: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ResultSet is from UPDATE. No Data.) at com.alibaba.otter.node.etl.select.selector.MessageParser.parse(MessageParser.java:211) at com.alibaba.otter.node.etl.select.selector.canal.CanalEmbedSelector.selector(CanalEmbedSelector.java:258) at com.alibaba.otter.node.etl.select.SelectTask.processSelect(SelectTask.java:236) at com.alibaba.otter.node.etl.select.SelectTask.access$300(SelectTask.java:94) at com.alibaba.otter.node.etl.select.SelectTask$1.run(SelectTask.java:208) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 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: com.google.common.collect.ComputationException: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ResultSet is from UPDATE. No Data.) at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:167) at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:116) at com.google.common.collect.ComputingConcurrentHashMap.apply(ComputingConcurrentHashMap.java:67) at com.google.common.collect.MapMaker$ComputingMapAdapter.get(MapMaker.java:623) at com.alibaba.otter.node.etl.common.db.dialect.DbDialectFactory.getDbDialect(DbDialectFactory.java:117) at com.alibaba.otter.node.etl.select.selector.MessageParser.internParse(MessageParser.java:442) at com.alibaba.otter.node.etl.select.selector.MessageParser.internParse(MessageParser.java:390) at com.alibaba.otter.node.etl.select.selector.MessageParser.parse(MessageParser.java:141) ... 9 more Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ResultSet is from UPDATE. No Data.) at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:331) at com.alibaba.otter.node.etl.common.db.dialect.DbDialectFactory$2$1.apply(DbDialectFactory.java:81) at com.alibaba.otter.node.etl.common.db.dialect.DbDialectFactory$2$1.apply(DbDialectFactory.java:76) at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:155) ... 16 more Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ResultSet is from UPDATE. No Data.) at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111) at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77) ... 20 more Caused by: java.sql.SQLException: ResultSet is from UPDATE. No Data. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:937) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:872) at com.mysql.jdbc.ResultSetImpl.next(ResultSetImpl.java:6327) at org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:207) at org.apache.commons.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:659) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1558) at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545) ... 24 more
原提问者GitHub用户 afareg
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。