alibaba / otter

阿里巴巴分布式数据库同步系统(解决中美异地机房)
Apache License 2.0
8.07k stars 2.49k forks source link

数据同步时间字段类型转换问题 #144

Open zjunbao opened 8 years ago

zjunbao commented 8 years ago

表数据结构: mysql> desc Province; +--------------------+------------------+------+-----+-------------------+-----------------------------+ | Field | Type | Null | Key | Default | Extra | +--------------------+------------------+------+-----+-------------------+-----------------------------+ | ProvinceID | int(10) unsigned | NO | PRI | NULL | auto_increment | | CountryID | int(10) unsigned | NO | | 0 | | | CnProvinceName | varchar(128) | NO | | NULL | | | CnProvinceFullName | varchar(128) | NO | | NULL | | | EnProvinceName | varchar(128) | NO | | NULL | | | EnProvinceFullName | varchar(128) | NO | | NULL | | | AddTime | datetime | NO | | NULL | | | SystemTime | timestamp | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP | +--------------------+------------------+------+-----+-------------------+-----------------------------+

源数据样例: | 2350 | 44 | 其他 | 其他 | Other | Other | 2011-05-05 17:14:05 | 2011-05-05 17:14:05 |

为什么 到目标表,变成时间 戳了。求教 pid:2 nid:3 exception:setl: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: com.alibaba.otter.node.etl.load.exception.LoadException: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [insert into mp_user.Province(CountryID , CnProvinceName , CnProvinceFullName , EnProvinceName , EnProvinceFullName , AddTime , SystemTime , ProvinceID) values (? , ? , ? , ? , ? , ? , ? , ?) on duplicate key update ProvinceID=values(ProvinceID) , CountryID=values(CountryID) , CnProvinceName=values(CnProvinceName) , CnProvinceFullName=values(CnProvinceFullName) , EnProvinceName=values(EnProvinceName) , EnProvinceFullName=values(EnProvinceFullName) , AddTime=values(AddTime) , SystemTime=values(SystemTime)]; Data truncation: [94380bb4f001000-1][10.171.127.231:3306]ERR-CODE: [TDDL-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'MP_USER_1456920974780KPLDMP_USER_RVEZ_0000_RDS': Data truncation: Incorrect datetime value: '1304586845000' for column 'AddTime' at row 1 More: [http://middleware.alibaba-inc.com/faq/faqByFaqCode.html?faqCode=TDDL-4614]; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: [94380bb4f001000-1][10.171.127.231:3306]ERR-CODE: [TDDL-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'MP_USER_1456920974780KPLDMP_USER_RVEZ_0000_RDS': Data truncation: Incorrect datetime value: '1304586845000' for column 'AddTime' at row 1 More: [http://middleware.alibaba-inc.com/faq/faqByFaqCode.html?faqCode=TDDL-4614] at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:101) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:603) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:812) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:868) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker$2.doInTransaction(DbLoadAction.java:538) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker.doCall(DbLoadAction.java:530) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker.call(DbLoadAction.java:458) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction.doTwoPhase(DbLoadAction.java:380) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction.doLoad(DbLoadAction.java:248) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction.load(DbLoadAction.java:153) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$$FastClassByCGLIB$$d932a4cb.invoke() at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:618) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$$EnhancerByCGLIB$$80fd23c2.load() at com.alibaba.otter.node.etl.load.loader.db.DataBatchLoader$2.call(DataBatchLoader.java:198) at com.alibaba.otter.node.etl.load.loader.db.DataBatchLoader$2.call(DataBatchLoader.java:189) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 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:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: [94380bb4f001000-1][10.171.127.231:3306]ERR-CODE: [TDDL-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'MP_USER_1456920974780KPLDMP_USER_RVEZ_0000_RDS': Data truncation: Incorrect datetime value: '1304586845000' for column 'AddTime' at row 1 More: [http://middleware.alibaba-inc.com/faq/faqByFaqCode.html?faqCode=TDDL-4614] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3560) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3494) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1960) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2114) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2696) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2105) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2398) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2316) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2301) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:818) at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:1) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:587) ... 21 more :-----------------

---Pks EventColumn[index=0,columnType=4,columnName=ProvinceID,columnValue=2350,isNull=false,isKey=true,isUpdate=true] ---oldPks

---Columns EventColumn[index=1,columnType=4,columnName=CountryID,columnValue=44,isNull=false,isKey=false,isUpdate=true] EventColumn[index=2,columnType=12,columnName=CnProvinceName,columnValue=其他,isNull=false,isKey=false,isUpdate=true] EventColumn[index=3,columnType=12,columnName=CnProvinceFullName,columnValue=其他,isNull=false,isKey=false,isUpdate=true] EventColumn[index=4,columnType=12,columnName=EnProvinceName,columnValue=Other1,isNull=false,isKey=false,isUpdate=true] EventColumn[index=5,columnType=12,columnName=EnProvinceFullName,columnValue=Other,isNull=false,isKey=false,isUpdate=true] EventColumn[index=6,columnType=93,columnName=AddTime,columnValue=1304586845000,isNull=false,isKey=false,isUpdate=true] EventColumn[index=7,columnType=93,columnName=SystemTime,columnValue=1463044384000,isNull=false,isKey=false,isUpdate=true] ---Sql insert into mp_user.Province(CountryID , CnProvinceName , CnProvinceFullName , EnProvinceName , EnProvinceFullName , AddTime , SystemTime , ProvinceID) values (? , ? , ? , ? , ? , ? , ? , ?) on duplicate key update ProvinceID=values(ProvinceID) , CountryID=values(CountryID) , CnProvinceName=values(CnProvinceName) , CnProvinceFullName=values(CnProvinceFullName) , EnProvinceName=values(EnProvinceName) , EnProvinceFullName=values(EnProvinceFullName) , AddTime=values(AddTime) , SystemTime=values(SystemTime)

Caused by: java.util.concurrent.ExecutionException: com.alibaba.otter.node.etl.load.exception.LoadException: com.alibaba.otter.node.etl.load.exception.LoadException: com.alibaba.otter.node.etl.load.exception.LoadException: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [insert into mp_user.Province(CountryID , CnProvinceName , CnProvinceFullName , EnProvinceName , EnProvinceFullName , AddTime , SystemTime , ProvinceID) values (? , ? , ? , ? , ? , ? , ? , ?) on duplicate key update ProvinceID=values(ProvinceID) , CountryID=values(CountryID) , CnProvinceName=values(CnProvinceName) , CnProvinceFullName=values(CnProvinceFullName) , EnProvinceName=values(EnProvinceName) , EnProvinceFullName=values(EnProvinceFullName) , AddTime=values(AddTime) , SystemTime=values(SystemTime)]; Data truncation: [94380bb4f001000-1][10.171.127.231:3306]ERR-CODE: [TDDL-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'MP_USER_1456920974780KPLDMP_USER_RVEZ_0000_RDS': Data truncation: Incorrect datetime value: '1304586845000' for column 'AddTime' at row 1 More: [http://middleware.alibaba-inc.com/faq/faqByFaqCode.html?faqCode=TDDL-4614]; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: [94380bb4f001000-1][10.171.127.231:3306]ERR-CODE: [TDDL-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'MP_USER_1456920974780KPLDMP_USER_RVEZ_0000_RDS': Data truncation: Incorrect datetime value: '1304586845000' for column 'AddTime' at row 1 More: [http://middleware.alibaba-inc.com/faq/faqByFaqCode.html?faqCode=TDDL-4614] at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:101) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:603) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:812) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:868) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker$2.doInTransaction(DbLoadAction.java:538) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker.doCall(DbLoadAction.java:530) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker.call(DbLoadAction.java:458) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction.doTwoPhase(DbLoadAction.java:380) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction.doLoad(DbLoadAction.java:248) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction.load(DbLoadAction.java:153) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$$FastClassByCGLIB$$d932a4cb.invoke() at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:618) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$$EnhancerByCGLIB$$80fd23c2.load() at com.alibaba.otter.node.etl.load.loader.db.DataBatchLoader$2.call(DataBatchLoader.java:198) at com.alibaba.otter.node.etl.load.loader.db.DataBatchLoader$2.call(DataBatchLoader.java:189) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 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:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: [94380bb4f001000-1][10.171.127.231:3306]ERR-CODE: [TDDL-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'MP_USER_1456920974780KPLDMP_USER_RVEZ_0000_RDS': Data truncation: Incorrect datetime value: '1304586845000' for column 'AddTime' at row 1 More: [http://middleware.alibaba-inc.com/faq/faqByFaqCode.html?faqCode=TDDL-4614] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3560) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3494) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1960) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2114) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2696) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2105) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2398) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2316) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2301) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:818) at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:1) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:587) ... 21 more :-----------------

---Pks EventColumn[index=0,columnType=4,columnName=ProvinceID,columnValue=2350,isNull=false,isKey=true,isUpdate=true] ---oldPks

---Columns EventColumn[index=1,columnType=4,columnName=CountryID,columnValue=44,isNull=false,isKey=false,isUpdate=true] EventColumn[index=2,columnType=12,columnName=CnProvinceName,columnValue=其他,isNull=false,isKey=false,isUpdate=true] EventColumn[index=3,columnType=12,columnName=CnProvinceFullName,columnValue=其他,isNull=false,isKey=false,isUpdate=true] EventColumn[index=4,columnType=12,columnName=EnProvinceName,columnValue=Other1,isNull=false,isKey=false,isUpdate=true] EventColumn[index=5,columnType=12,columnName=EnProvinceFullName,columnValue=Other,isNull=false,isKey=false,isUpdate=true] EventColumn[index=6,columnType=93,columnName=AddTime,columnValue=1304586845000,isNull=false,isKey=false,isUpdate=true] EventColumn[index=7,columnType=93,columnName=SystemTime,columnValue=1463044384000,isNull=false,isKey=false,isUpdate=true] ---Sql insert into mp_user.Province(CountryID , CnProvinceName , CnProvinceFullName , EnProvinceName , EnProvinceFullName , AddTime , SystemTime , ProvinceID) values (? , ? , ? , ? , ? , ? , ? , ?) on duplicate key update ProvinceID=values(ProvinceID) , CountryID=values(CountryID) , CnProvinceName=values(CnProvinceName) , CnProvinceFullName=values(CnProvinceFullName) , EnProvinceName=values(EnProvinceName) , EnProvinceFullName=values(EnProvinceFullName) , AddTime=values(AddTime) , SystemTime=values(SystemTime)

at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at com.alibaba.otter.node.etl.load.loader.db.DataBatchLoader.load(DataBatchLoader.java:107) at com.alibaba.otter.node.etl.load.loader.OtterLoaderFactory.load(OtterLoaderFactory.java:50) at com.alibaba.otter.node.etl.load.LoadTask$1.run(LoadTask.java:85) 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:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: com.alibaba.otter.node.etl.load.exception.LoadException: com.alibaba.otter.node.etl.load.exception.LoadException: com.alibaba.otter.node.etl.load.exception.LoadException: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [insert into mp_user.Province(CountryID , CnProvinceName , CnProvinceFullName , EnProvinceName , EnProvinceFullName , AddTime , SystemTime , ProvinceID) values (? , ? , ? , ? , ? , ? , ? , ?) on duplicate key update ProvinceID=values(ProvinceID) , CountryID=values(CountryID) , CnProvinceName=values(CnProvinceName) , CnProvinceFullName=values(CnProvinceFullName) , EnProvinceName=values(EnProvinceName) , EnProvinceFullName=values(EnProvinceFullName) , AddTime=values(AddTime) , SystemTime=values(SystemTime)]; Data truncation: [94380bb4f001000-1][10.171.127.231:3306]ERR-CODE: [TDDL-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'MP_USER_1456920974780KPLDMP_USER_RVEZ_0000_RDS': Data truncation: Incorrect datetime value: '1304586845000' for column 'AddTime' at row 1 More: [http://middleware.alibaba-inc.com/faq/faqByFaqCode.html?faqCode=TDDL-4614]; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: [94380bb4f001000-1][10.171.127.231:3306]ERR-CODE: [TDDL-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'MP_USER_1456920974780KPLDMP_USER_RVEZ_0000_RDS': Data truncation: Incorrect datetime value: '1304586845000' for column 'AddTime' at row 1 More: [http://middleware.alibaba-inc.com/faq/faqByFaqCode.html?faqCode=TDDL-4614] at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:101) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:603) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:812) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:868) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker$2.doInTransaction(DbLoadAction.java:538) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker.doCall(DbLoadAction.java:530) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker.call(DbLoadAction.java:458) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction.doTwoPhase(DbLoadAction.java:380) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction.doLoad(DbLoadAction.java:248) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction.load(DbLoadAction.java:153) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$$FastClassByCGLIB$$d932a4cb.invoke() at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:618) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$$EnhancerByCGLIB$$80fd23c2.load() at com.alibaba.otter.node.etl.load.loader.db.DataBatchLoader$2.call(DataBatchLoader.java:198) at com.alibaba.otter.node.etl.load.loader.db.DataBatchLoader$2.call(DataBatchLoader.java:189) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 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:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: [94380bb4f001000-1][10.171.127.231:3306]ERR-CODE: [TDDL-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'MP_USER_1456920974780KPLDMP_USER_RVEZ_0000_RDS': Data truncation: Incorrect datetime value: '1304586845000' for column 'AddTime' at row 1 More: [http://middleware.alibaba-inc.com/faq/faqByFaqCode.html?faqCode=TDDL-4614] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3560) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3494) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1960) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2114) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2696) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2105) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2398) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2316) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2301) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:818) at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:1) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:587) ... 21 more :-----------------

---Pks EventColumn[index=0,columnType=4,columnName=ProvinceID,columnValue=2350,isNull=false,isKey=true,isUpdate=true] ---oldPks

---Columns EventColumn[index=1,columnType=4,columnName=CountryID,columnValue=44,isNull=false,isKey=false,isUpdate=true] EventColumn[index=2,columnType=12,columnName=CnProvinceName,columnValue=其他,isNull=false,isKey=false,isUpdate=true] EventColumn[index=3,columnType=12,columnName=CnProvinceFullName,columnValue=其他,isNull=false,isKey=false,isUpdate=true] EventColumn[index=4,columnType=12,columnName=EnProvinceName,columnValue=Other1,isNull=false,isKey=false,isUpdate=true] EventColumn[index=5,columnType=12,columnName=EnProvinceFullName,columnValue=Other,isNull=false,isKey=false,isUpdate=true] EventColumn[index=6,columnType=93,columnName=AddTime,columnValue=1304586845000,isNull=false,isKey=false,isUpdate=true] EventColumn[index=7,columnType=93,columnName=SystemTime,columnValue=1463044384000,isNull=false,isKey=false,isUpdate=true] ---Sql insert into mp_user.Province(CountryID , CnProvinceName , CnProvinceFullName , EnProvinceName , EnProvinceFullName , AddTime , SystemTime , ProvinceID) values (? , ? , ? , ? , ? , ? , ? , ?) on duplicate key update ProvinceID=values(ProvinceID) , CountryID=values(CountryID) , CnProvinceName=values(CnProvinceName) , CnProvinceFullName=values(CnProvinceFullName) , EnProvinceName=values(EnProvinceName) , EnProvinceFullName=values(EnProvinceFullName) , AddTime=values(AddTime) , SystemTime=values(SystemTime)

Caused by: com.alibaba.otter.node.etl.load.exception.LoadException: com.alibaba.otter.node.etl.load.exception.LoadException: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [insert into mp_user.Province(CountryID , CnProvinceName , CnProvinceFullName , EnProvinceName , EnProvinceFullName , AddTime , SystemTime , ProvinceID) values (? , ? , ? , ? , ? , ? , ? , ?) on duplicate key update ProvinceID=values(ProvinceID) , CountryID=values(CountryID) , CnProvinceName=values(CnProvinceName) , CnProvinceFullName=values(CnProvinceFullName) , EnProvinceName=values(EnProvinceName) , EnProvinceFullName=values(EnProvinceFullName) , AddTime=values(AddTime) , SystemTime=values(SystemTime)]; Data truncation: [94380bb4f001000-1][10.171.127.231:3306]ERR-CODE: [TDDL-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'MP_USER_1456920974780KPLDMP_USER_RVEZ_0000_RDS': Data truncation: Incorrect datetime value: '1304586845000' for column 'AddTime' at row 1 More: [http://middleware.alibaba-inc.com/faq/faqByFaqCode.html?faqCode=TDDL-4614]; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: [94380bb4f001000-1][10.171.127.231:3306]ERR-CODE: [TDDL-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'MP_USER_1456920974780KPLDMP_USER_RVEZ_0000_RDS': Data truncation: Incorrect datetime value: '1304586845000' for column 'AddTime' at row 1 More: [http://middleware.alibaba-inc.com/faq/faqByFaqCode.html?faqCode=TDDL-4614] at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:101) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:603) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:812) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:868) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker$2.doInTransaction(DbLoadAction.java:538) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker.doCall(DbLoadAction.java:530) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker.call(DbLoadAction.java:458) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction.doTwoPhase(DbLoadAction.java:380) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction.doLoad(DbLoadAction.java:248) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction.load(DbLoadAction.java:153) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$$FastClassByCGLIB$$d932a4cb.invoke() at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:618) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$$EnhancerByCGLIB$$80fd23c2.load() at com.alibaba.otter.node.etl.load.loader.db.DataBatchLoader$2.call(DataBatchLoader.java:198) at com.alibaba.otter.node.etl.load.loader.db.DataBatchLoader$2.call(DataBatchLoader.java:189) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 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:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: [94380bb4f001000-1][10.171.127.231:3306]ERR-CODE: [TDDL-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'MP_USER_1456920974780KPLDMP_USER_RVEZ_0000_RDS': Data truncation: Incorrect datetime value: '1304586845000' for column 'AddTime' at row 1 More: [http://middleware.alibaba-inc.com/faq/faqByFaqCode.html?faqCode=TDDL-4614] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3560) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3494) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1960) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2114) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2696) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2105) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2398) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2316) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2301) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:818) at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:1) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:587) ... 21 more :-----------------

---Pks EventColumn[index=0,columnType=4,columnName=ProvinceID,columnValue=2350,isNull=false,isKey=true,isUpdate=true] ---oldPks

---Columns EventColumn[index=1,columnType=4,columnName=CountryID,columnValue=44,isNull=false,isKey=false,isUpdate=true] EventColumn[index=2,columnType=12,columnName=CnProvinceName,columnValue=其他,isNull=false,isKey=false,isUpdate=true] EventColumn[index=3,columnType=12,columnName=CnProvinceFullName,columnValue=其他,isNull=false,isKey=false,isUpdate=true] EventColumn[index=4,columnType=12,columnName=EnProvinceName,columnValue=Other1,isNull=false,isKey=false,isUpdate=true] EventColumn[index=5,columnType=12,columnName=EnProvinceFullName,columnValue=Other,isNull=false,isKey=false,isUpdate=true] EventColumn[index=6,columnType=93,columnName=AddTime,columnValue=1304586845000,isNull=false,isKey=false,isUpdate=true] EventColumn[index=7,columnType=93,columnName=SystemTime,columnValue=1463044384000,isNull=false,isKey=false,isUpdate=true] ---Sql insert into mp_user.Province(CountryID , CnProvinceName , CnProvinceFullName , EnProvinceName , EnProvinceFullName , AddTime , SystemTime , ProvinceID) values (? , ? , ? , ? , ? , ? , ? , ?) on duplicate key update ProvinceID=values(ProvinceID) , CountryID=values(CountryID) , CnProvinceName=values(CnProvinceName) , CnProvinceFullName=values(CnProvinceFullName) , EnProvinceName=values(EnProvinceName) , EnProvinceFullName=values(EnProvinceFullName) , AddTime=values(AddTime) , SystemTime=values(SystemTime)

Caused by: com.alibaba.otter.node.etl.load.exception.LoadException: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [insert into mp_user.Province(CountryID , CnProvinceName , CnProvinceFullName , EnProvinceName , EnProvinceFullName , AddTime , SystemTime , ProvinceID) values (? , ? , ? , ? , ? , ? , ? , ?) on duplicate key update ProvinceID=values(ProvinceID) , CountryID=values(CountryID) , CnProvinceName=values(CnProvinceName) , CnProvinceFullName=values(CnProvinceFullName) , EnProvinceName=values(EnProvinceName) , EnProvinceFullName=values(EnProvinceFullName) , AddTime=values(AddTime) , SystemTime=values(SystemTime)]; Data truncation: [94380bb4f001000-1][10.171.127.231:3306]ERR-CODE: [TDDL-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'MP_USER_1456920974780KPLDMP_USER_RVEZ_0000_RDS': Data truncation: Incorrect datetime value: '1304586845000' for column 'AddTime' at row 1 More: [http://middleware.alibaba-inc.com/faq/faqByFaqCode.html?faqCode=TDDL-4614]; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: [94380bb4f001000-1][10.171.127.231:3306]ERR-CODE: [TDDL-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'MP_USER_1456920974780KPLDMP_USER_RVEZ_0000_RDS': Data truncation: Incorrect datetime value: '1304586845000' for column 'AddTime' at row 1 More: [http://middleware.alibaba-inc.com/faq/faqByFaqCode.html?faqCode=TDDL-4614] at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:101) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:603) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:812) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:868) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker$2.doInTransaction(DbLoadAction.java:538) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker.doCall(DbLoadAction.java:530) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker.call(DbLoadAction.java:458) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction.doTwoPhase(DbLoadAction.java:380) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction.doLoad(DbLoadAction.java:248) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction.load(DbLoadAction.java:153) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$$FastClassByCGLIB$$d932a4cb.invoke() at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:618) at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$$EnhancerByCGLIB$$80fd23c2.load() at com.alibaba.otter.node.etl.load.loader.db.DataBatchLoader$2.call(DataBatchLoader.java:198) at com.alibaba.otter.node.etl.load.loader.db.DataBatchLoader$2.call(DataBatchLoader.java:189) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 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:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: [94380bb4f001000-1][10.171.127.231:3306]ERR-CODE: [TDDL-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'MP_USER_1456920974780KPLDMP_USER_RVEZ_0000_RDS': Data truncation: Incorrect datetime value: '1304586845000' for column 'AddTime' at row 1 More: [http://middleware.alibaba-inc.com/faq/faqByFaqCode.html?faqCode=TDDL-4614] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3560) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3494) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1960) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2114) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2696) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2105) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2398) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2316) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2301) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:818) at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:1) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:587) ... 21 more :-----------------

---Pks EventColumn[index=0,columnType=4,columnName=ProvinceID,columnValue=2350,isNull=false,isKey=true,isUpdate=true] ---oldPks

---Columns EventColumn[index=1,columnType=4,columnName=CountryID,columnValue=44,isNull=false,isKey=false,isUpdate=true] EventColumn[index=2,columnType=12,columnName=CnProvinceName,columnValue=其他,isNull=false,isKey=false,isUpdate=true] EventColumn[index=3,columnType=12,columnName=CnProvinceFullName,columnValue=其他,isNull=false,isKey=false,isUpdate=true] EventColumn[index=4,columnType=12,columnName=EnProvinceName,columnValue=Other1,isNull=false,isKey=false,isUpdate=true] EventColumn[index=5,columnType=12,columnName=EnProvinceFullName,columnValue=Other,isNull=false,isKey=false,isUpdate=true] EventColumn[index=6,columnType=93,columnName=AddTime,columnValue=1304586845000,isNull=false,isKey=false,isUpdate=true] EventColumn[index=7,columnType=93,columnName=SystemTime,columnValue=1463044384000,isNull=false,isKey=false,isUpdate=true] ---Sql insert into mp_user.Province(CountryID , CnProvinceName , CnProvinceFullName , EnProvinceName , EnProvinceFullName , AddTime , SystemTime , ProvinceID) values (? , ? , ? , ? , ? , ? , ? , ?) on duplicate key update ProvinceID=values(ProvinceID) , CountryID=values(CountryID) , CnProvinceName=values(CnProvinceName) , CnProvinceFullName=values(CnProvinceFullName) , EnProvinceName=values(EnProvinceName) , EnProvinceFullName=values(EnProvinceFullName) , AddTime=values(AddTime) , SystemTime=values(SystemTime)

agapple commented 8 years ago

EventColumn[index=6,columnType=93,columnName=AddTime,columnValue=1304586845000,isNull=false,isKey=false,isUpdate=true] EventColumn[index=7,columnType=93,columnName=SystemTime,columnValue=1463044384000,isNull=false,isKey=false,isUpdate=true]

看一下源库的数据类型