MySQL zeroDateTimeBehavior 和 characterEncoding 配置冲突

提取 MySQL 数据时 Date 的值为空或者为'0000-00-00 00:00:00' 时报错,配置了zeroDateTimeBehavior 后中文数据就乱码了,不加就报错

Spoon:图形化界面工具(GUI方式),Spoon允许你通过图形界面来设计Job和Transformation,可以保存为文件或者保存在数据库中。也可以直接在Spoon图形化界面中运行Job和Transformation
版面规则
请务必将问题描述清晰!!!1.软件版本:2.发生频率:每次/经常/偶尔3.报错日志截图(可以直接粘贴图片):
回复
PHP
帖子: 1
注册时间: 2019年 9月 24日 星期二 11:11 am

求助 MySQL zeroDateTimeBehavior 和 characterEncoding 配置冲突

#1

帖子 PHP » 2019年 9月 24日 星期二 11:19 am

未添加zeroDateTimeBehavior 报错:

    

2019/09/24 09:28:05 - Carte - Installing timer to purge stale objects after 1440 minutes.

2019/09/24 10:10:24 - Spoon - 另存为...

2019/09/24 10:10:24 - Spoon - Save file as...

2019/09/24 11:19:30 - C:\Users\Administrator.USER-20181129OC\Desktop\system_log_login.ktr : system_log_login - 为了转换解除补丁开始  [C:\Users\Administrator.USER-20181129OC\Desktop\system_log_login.ktr : system_log_login]

2019/09/24 11:19:30 - mysql 数据.0 - ERROR (version 7.1.0.0-12, build 1 from 2017-05-16 17.18.02 by buildguy) : Unexpected error

2019/09/24 11:19:30 - mysql 数据.0 - ERROR (version 7.1.0.0-12, build 1 from 2017-05-16 17.18.02 by buildguy) : org.pentaho.di.core.exception.KettleDatabaseException: 

2019/09/24 11:19:30 - mysql 数据.0 - Couldn't get row from result set

2019/09/24 11:19:30 - mysql 数据.0 - 

2019/09/24 11:19:30 - mysql 数据.0 - Timestamp : Unable to get timestamp from resultset at index 11

2019/09/24 11:19:30 - mysql 数据.0 - Cannot convert value '0000-00-00 00:00:00' from column 12 to TIMESTAMP.

2019/09/24 11:19:30 - mysql 数据.0 - 

2019/09/24 11:19:30 - mysql 数据.0 - 

2019/09/24 11:19:30 - mysql 数据.0 - at org.pentaho.di.core.database.Database.getRow(Database.java:2546)

2019/09/24 11:19:30 - mysql 数据.0 - at org.pentaho.di.core.database.Database.getRow(Database.java:2516)

2019/09/24 11:19:30 - mysql 数据.0 - at org.pentaho.di.core.database.Database.getRow(Database.java:2494)

2019/09/24 11:19:30 - mysql 数据.0 - at org.pentaho.di.trans.steps.tableinput.TableInput.doQuery(TableInput.java:262)

2019/09/24 11:19:30 - mysql 数据.0 - at org.pentaho.di.trans.steps.tableinput.TableInput.processRow(TableInput.java:140)

2019/09/24 11:19:30 - mysql 数据.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)

2019/09/24 11:19:30 - mysql 数据.0 - at java.lang.Thread.run(Thread.java:748)

2019/09/24 11:19:30 - mysql 数据.0 - Caused by: org.pentaho.di.core.exception.KettleDatabaseException: 

2019/09/24 11:19:30 - mysql 数据.0 - Timestamp : Unable to get timestamp from resultset at index 11

2019/09/24 11:19:30 - mysql 数据.0 - Cannot convert value '0000-00-00 00:00:00' from column 12 to TIMESTAMP.

2019/09/24 11:19:30 - mysql 数据.0 - 

2019/09/24 11:19:30 - mysql 数据.0 - at org.pentaho.di.core.row.value.ValueMetaTimestamp.getValueFromResultSet(ValueMetaTimestamp.java:482)

2019/09/24 11:19:30 - mysql 数据.0 - at org.pentaho.di.core.database.BaseDatabaseMeta.getValueFromResultSet(BaseDatabaseMeta.java:2107)

2019/09/24 11:19:30 - mysql 数据.0 - at org.pentaho.di.core.database.DatabaseMeta.getValueFromResultSet(DatabaseMeta.java:2950)

2019/09/24 11:19:30 - mysql 数据.0 - at org.pentaho.di.core.database.Database.getRow(Database.java:2538)

2019/09/24 11:19:30 - mysql 数据.0 - ... 6 more

2019/09/24 11:19:30 - mysql 数据.0 - Caused by: java.sql.SQLException: Cannot convert value '0000-00-00 00:00:00' from column 12 to TIMESTAMP.

2019/09/24 11:19:30 - mysql 数据.0 - at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)

2019/09/24 11:19:30 - mysql 数据.0 - at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)

2019/09/24 11:19:30 - mysql 数据.0 - at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)

2019/09/24 11:19:30 - mysql 数据.0 - at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)

2019/09/24 11:19:30 - mysql 数据.0 - at com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:1337)

2019/09/24 11:19:30 - mysql 数据.0 - at com.mysql.jdbc.BufferRow.getTimestampFast(BufferRow.java:576)

2019/09/24 11:19:30 - mysql 数据.0 - at com.mysql.jdbc.ResultSetImpl.getTimestampInternal(ResultSetImpl.java:6754)

2019/09/24 11:19:30 - mysql 数据.0 - at com.mysql.jdbc.ResultSetImpl.getTimestamp(ResultSetImpl.java:6073)

2019/09/24 11:19:30 - mysql 数据.0 - at org.pentaho.di.core.row.value.ValueMetaTimestamp.getValueFromResultSet(ValueMetaTimestamp.java:478)

2019/09/24 11:19:30 - mysql 数据.0 - ... 9 more

2019/09/24 11:19:30 - mysql 数据.0 - Caused by: java.sql.SQLException: Value '[B@4ce83a3f' can not be represented as java.sql.Timestamp

2019/09/24 11:19:30 - mysql 数据.0 - at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)

2019/09/24 11:19:30 - mysql 数据.0 - at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)

2019/09/24 11:19:30 - mysql 数据.0 - at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)

2019/09/24 11:19:30 - mysql 数据.0 - at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)

2019/09/24 11:19:30 - mysql 数据.0 - at com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:1035)

2019/09/24 11:19:30 - mysql 数据.0 - ... 13 more

2019/09/24 11:19:30 - mysql 数据.0 - Finished reading query, closing connection.

2019/09/24 11:19:30 - mysql 数据.0 - 完成处理 (I=1, O=0, R=0, W=0, U=0, E=1)

2019/09/24 11:19:30 - C:\Users\Administrator.USER-20181129OC\Desktop\system_log_login.ktr : system_log_login - 转换被检测 

2019/09/24 11:19:30 - C:\Users\Administrator.USER-20181129OC\Desktop\system_log_login.ktr : system_log_login - 转换正在杀死其他步骤!









,添加后就乱码


回复