[ https://issues.apache.org/jira/browse/KAFKA-5067?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Curtis Wilde updated KAFKA-5067: -------------------------------- Description: Kafka Connect throws java.sql.SQLDataException when attempting to use Redshift as a data source. When I run the query "select CURRENT_TIMESTAMP;" in a SQL editor it returns: 2017-04-13 16:11:25.204925+00 Full stack trace: [2017-04-13 09:44:09,910] ERROR Failed to get current time from DB using query select CURRENT_TIMESTAMP; on database PostgreSQL (io.confluent.connect.jdbc.util.JdbcUtils:205) java.sql.SQLDataException: [Amazon][JDBC](10140) Error converting value to Timestamp. at com.amazon.exceptions.ExceptionConverter.toSQLException(Unknown Source) at com.amazon.utilities.conversion.TypeConverter.convertToTimestamp(Unknown Source) at com.amazon.utilities.conversion.TypeConverter.toTimestamp(Unknown Source) at com.amazon.jdbc.common.SForwardResultSet.getTimestamp(Unknown Source) at io.confluent.connect.jdbc.util.JdbcUtils.getCurrentTimeOnDB(JdbcUtils.java:201) at io.confluent.connect.jdbc.source.TimestampIncrementingTableQuerier.executeQuery(TimestampIncrementingTableQuerier.java:169) at io.confluent.connect.jdbc.source.TableQuerier.maybeStartQuery(TableQuerier.java:84) at io.confluent.connect.jdbc.source.TimestampIncrementingTableQuerier.maybeStartQuery(TimestampIncrementingTableQuerier.java:55) at io.confluent.connect.jdbc.source.JdbcSourceTask.poll(JdbcSourceTask.java:200) at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:162) at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:139) at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:182) 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) [2017-04-13 09:44:09,912] ERROR Failed to run query for table TimestampIncrementingTableQuerier{name='null', query='<some query>', topicPrefix='<some prefix>', timestampColumn='<timestamp column name>', incrementingColumn='null'}: {} (io.confluent.connect.jdbc.source.JdbcSourceTask:221) java.sql.SQLDataException: [Amazon][JDBC](10140) Error converting value to Timestamp. at com.amazon.exceptions.ExceptionConverter.toSQLException(Unknown Source) at com.amazon.utilities.conversion.TypeConverter.convertToTimestamp(Unknown Source) at com.amazon.utilities.conversion.TypeConverter.toTimestamp(Unknown Source) at com.amazon.jdbc.common.SForwardResultSet.getTimestamp(Unknown Source) at io.confluent.connect.jdbc.util.JdbcUtils.getCurrentTimeOnDB(JdbcUtils.java:201) at io.confluent.connect.jdbc.source.TimestampIncrementingTableQuerier.executeQuery(TimestampIncrementingTableQuerier.java:169) at io.confluent.connect.jdbc.source.TableQuerier.maybeStartQuery(TableQuerier.java:84) at io.confluent.connect.jdbc.source.TimestampIncrementingTableQuerier.maybeStartQuery(TimestampIncrementingTableQuerier.java:55) at io.confluent.connect.jdbc.source.JdbcSourceTask.poll(JdbcSourceTask.java:200) at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:162) at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:139) at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:182) 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) [2017-04-13 09:44:12,236] INFO Kafka Connect stopping (org.apache.kafka.connect.runtime.Connect:66) was: Kafka Connect throws java.sql.SQLDataException when attempting to use Redshift as a data source. When I run the query "select CURRENT_TIMESTAMP;" in a SQL editor it returns: 2017-04-13 16:11:25.204925+00 Full stack trace: [2017-04-13 09:44:09,910] ERROR Failed to get current time from DB using query select CURRENT_TIMESTAMP; on database PostgreSQL (io.confluent.connect.jdbc.util.JdbcUtils:205) java.sql.SQLDataException: [Amazon][JDBC](10140) Error converting value to Timestamp. at com.amazon.exceptions.ExceptionConverter.toSQLException(Unknown Source) at com.amazon.utilities.conversion.TypeConverter.convertToTimestamp(Unknown Source) at com.amazon.utilities.conversion.TypeConverter.toTimestamp(Unknown Source) at com.amazon.jdbc.common.SForwardResultSet.getTimestamp(Unknown Source) at io.confluent.connect.jdbc.util.JdbcUtils.getCurrentTimeOnDB(JdbcUtils.java:201) at io.confluent.connect.jdbc.source.TimestampIncrementingTableQuerier.executeQuery(TimestampIncrementingTableQuerier.java:169) at io.confluent.connect.jdbc.source.TableQuerier.maybeStartQuery(TableQuerier.java:84) at io.confluent.connect.jdbc.source.TimestampIncrementingTableQuerier.maybeStartQuery(TimestampIncrementingTableQuerier.java:55) at io.confluent.connect.jdbc.source.JdbcSourceTask.poll(JdbcSourceTask.java:200) at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:162) at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:139) at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:182) 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) [2017-04-13 09:44:09,912] ERROR Failed to run query for table TimestampIncrementingTableQuerier{name='null', query='<some query>', topicPrefix='<some prefix>', timestampColumn='<timestamp column name>', incrementingColumn='null'}: {} (io.confluent.connect.jdbc.source.JdbcSourceTask:221) java.sql.SQLDataException: [Amazon][JDBC](10140) Error converting value to Timestamp. at com.amazon.exceptions.ExceptionConverter.toSQLException(Unknown Source) at com.amazon.utilities.conversion.TypeConverter.convertToTimestamp(Unknown Source) at com.amazon.utilities.conversion.TypeConverter.toTimestamp(Unknown Source) at com.amazon.jdbc.common.SForwardResultSet.getTimestamp(Unknown Source) at io.confluent.connect.jdbc.util.JdbcUtils.getCurrentTimeOnDB(JdbcUtils.java:201) at io.confluent.connect.jdbc.source.TimestampIncrementingTableQuerier.executeQuery(TimestampIncrementingTableQuerier.java:169) at io.confluent.connect.jdbc.source.TableQuerier.maybeStartQuery(TableQuerier.java:84) at io.confluent.connect.jdbc.source.TimestampIncrementingTableQuerier.maybeStartQuery(TimestampIncrementingTableQuerier.java:55) at io.confluent.connect.jdbc.source.JdbcSourceTask.poll(JdbcSourceTask.java:200) at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:162) at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:139) at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:182) 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) ^C[2017-04-13 09:44:12,236] INFO Kafka Connect stopping (org.apache.kafka.connect.runtime.Connect:66) > java.sql.SQLDataException on TimeStamp column when using AWS Redshift as a > JDBC source > -------------------------------------------------------------------------------------- > > Key: KAFKA-5067 > URL: https://issues.apache.org/jira/browse/KAFKA-5067 > Project: Kafka > Issue Type: Bug > Components: KafkaConnect > Affects Versions: 0.10.2.0 > Reporter: Curtis Wilde > Priority: Minor > > Kafka Connect throws java.sql.SQLDataException when attempting to use > Redshift as a data source. > When I run the query "select CURRENT_TIMESTAMP;" in a SQL editor it returns: > 2017-04-13 16:11:25.204925+00 > Full stack trace: > [2017-04-13 09:44:09,910] ERROR Failed to get current time from DB using > query select CURRENT_TIMESTAMP; on database PostgreSQL > (io.confluent.connect.jdbc.util.JdbcUtils:205) > java.sql.SQLDataException: [Amazon][JDBC](10140) Error converting value to > Timestamp. > at com.amazon.exceptions.ExceptionConverter.toSQLException(Unknown > Source) > at > com.amazon.utilities.conversion.TypeConverter.convertToTimestamp(Unknown > Source) > at com.amazon.utilities.conversion.TypeConverter.toTimestamp(Unknown > Source) > at com.amazon.jdbc.common.SForwardResultSet.getTimestamp(Unknown Source) > at > io.confluent.connect.jdbc.util.JdbcUtils.getCurrentTimeOnDB(JdbcUtils.java:201) > at > io.confluent.connect.jdbc.source.TimestampIncrementingTableQuerier.executeQuery(TimestampIncrementingTableQuerier.java:169) > at > io.confluent.connect.jdbc.source.TableQuerier.maybeStartQuery(TableQuerier.java:84) > at > io.confluent.connect.jdbc.source.TimestampIncrementingTableQuerier.maybeStartQuery(TimestampIncrementingTableQuerier.java:55) > at > io.confluent.connect.jdbc.source.JdbcSourceTask.poll(JdbcSourceTask.java:200) > at > org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:162) > at > org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:139) > at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:182) > 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) > [2017-04-13 09:44:09,912] ERROR Failed to run query for table > TimestampIncrementingTableQuerier{name='null', query='<some query>', > topicPrefix='<some prefix>', timestampColumn='<timestamp column name>', > incrementingColumn='null'}: {} > (io.confluent.connect.jdbc.source.JdbcSourceTask:221) > java.sql.SQLDataException: [Amazon][JDBC](10140) Error converting value to > Timestamp. > at com.amazon.exceptions.ExceptionConverter.toSQLException(Unknown > Source) > at > com.amazon.utilities.conversion.TypeConverter.convertToTimestamp(Unknown > Source) > at com.amazon.utilities.conversion.TypeConverter.toTimestamp(Unknown > Source) > at com.amazon.jdbc.common.SForwardResultSet.getTimestamp(Unknown Source) > at > io.confluent.connect.jdbc.util.JdbcUtils.getCurrentTimeOnDB(JdbcUtils.java:201) > at > io.confluent.connect.jdbc.source.TimestampIncrementingTableQuerier.executeQuery(TimestampIncrementingTableQuerier.java:169) > at > io.confluent.connect.jdbc.source.TableQuerier.maybeStartQuery(TableQuerier.java:84) > at > io.confluent.connect.jdbc.source.TimestampIncrementingTableQuerier.maybeStartQuery(TimestampIncrementingTableQuerier.java:55) > at > io.confluent.connect.jdbc.source.JdbcSourceTask.poll(JdbcSourceTask.java:200) > at > org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:162) > at > org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:139) > at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:182) > 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) > [2017-04-13 09:44:12,236] INFO Kafka Connect stopping > (org.apache.kafka.connect.runtime.Connect:66) -- This message was sent by Atlassian JIRA (v6.3.15#6346)