1

I am trying to use kafka connect jdbc , to source data from DB2 to kafka topic , but am trying to run the application , am seeing below error , which i think to execute configured connector query and that is the reason kafka topic is empty , below complete error details

[2019-05-20 09:56:16,832] ERROR Failed to get current time from DB using query values(CURRENT_TIMESTAMP) on database DB2 (io.confluent.connect.jdbc.util.JdbcUtils:264)

more exception stack trace is below

io.confluent.connect.jdbc.source.TimestampIncrementingTableQuerier.executeQuery(TimestampIncrementingTableQuerier.java:168)

    May 20th 2019, 15:26:16.836     at com.ibm.db2.jcc.am.fp.d(Unknown Source)

    May 20th 2019, 15:26:16.836     at com.ibm.db2.jcc.am.fp.c(Unknown Source)

    May 20th 2019, 15:26:16.836     at io.confluent.connect.jdbc.source.TimestampIncrementingTableQuerier.maybeStartQuery(TimestampIncrementingTableQuerier.java:55)

    May 20th 2019, 15:26:16.836     at com.ibm.db2.jcc.am.fp.a(Unknown Source)

    May 20th 2019, 15:26:16.836     at com.ibm.db2.jcc.am.kd.a(Unknown Source)

    May 20th 2019, 15:26:16.836     at io.confluent.connect.jdbc.util.JdbcUtils.getCurrentTimeOnDB(JdbcUtils.java:255)

    May 20th 2019, 15:26:16.836     at io.confluent.connect.jdbc.source.JdbcSourceTask.poll(JdbcSourceTask.java:225)

    May 20th 2019, 15:26:16.836 com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-142, SQLSTATE=42612, SQLERRMC=null, DRIVER=4.19.26

    May 20th 2019, 15:26:16.836     at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:214)

    May 20th 2019, 15:26:16.836     at com.ibm.db2.jcc.t4.vb.i(Unknown Source)

    May 20th 2019, 15:26:16.835     at com.ibm.db2.jcc.am.fp.c(Unknown Source)

    May 20th 2019, 15:26:16.835     at com.ibm.db2.jcc.am.kd.a(Unknown Source)

    May 20th 2019, 15:26:16.835 [2019-05-20 09:56:16,832] ERROR Failed to get current time from DB using query values(CURRENT_TIMESTAMP) on database DB2 (io.confluent.connect.jdbc.util.JdbcUtils:264)

    May 20th 2019, 15:26:16.835     at com.ibm.db2.jcc.am.fp.d(Unknown Source)

    May 20th 2019, 15:26:16.835     at com.ibm.db2.jcc.am.kd.a(Unknown Source)

    May 20th 2019, 15:26:16.835 com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-142, SQLSTATE=42612, SQLERRMC=null, DRIVER=4.19.26

    May 20th 2019, 15:26:16.835     at com.ibm.db2.jcc.t4.p.a(Unknown Source)

    May 20th 2019, 15:26:16.835     at com.ibm.db2.jcc.t4.bb.b(Unknown Source)

    May 20th 2019, 15:26:16.835     at com.ibm.db2.jcc.am.kd.a(Unknown Source)

    May 20th 2019, 15:26:16.835     at com.ibm.db2.jcc.am.fp.a(Unknown Source)

    May 20th 2019, 15:26:16.835     at com.ibm.db2.jcc.am.fp.a(Unknown Source)

    May 20th 2019, 15:26:16.835     at com.ibm.db2.jcc.t4.bb.h(Unknown Source)

Below the details about my app environment

kafka connect jdbc version is : kafka-connect-jdbc-4.1.0.jar and Db2 jar versions :

db2jcc_license_cisuz-1.0.jar db2jcc_license_cu-1.0.jar db2jcc4-4.19.26.jar

is their something wrong with kafka connect jdbc which am using ?

i saw this issue

https://github.com/confluentinc/kafka-connect-jdbc/issues/211

so according to that do i need to change my kafka-connect-jdbc jar version to newer version ? if i do what other files i need to change or add in kafka connect for my application or any other different solution ? please suggest .

Bravo
  • 8,589
  • 14
  • 48
  • 85
  • Kafka Connect JDBC 4.1 is pretty old - the latest release is 5.2. I would check this with the newer version definitely. – Robin Moffatt May 20 '19 at 10:14
  • @RobinMoffatt , i just removed old version jar and added 5.2.1 kafka-connect-jdbc jar am trying with that new change – Bravo May 20 '19 at 10:24
  • @RobinMoffatt , am still seeing the same issue with 5.2.1 version jar also – Bravo May 20 '19 at 10:30
  • What is your Db2 server platform and version? – mustaccio May 20 '19 at 15:28
  • any query to find the version of the DB2 Server ? – Bravo May 20 '19 at 22:08
  • @RobinMoffatt , when i execute the query ```select CURRENT APPLICATION COMPATIBILITY from sysibm.sysdummy1``` , i got the result as ```V10R1``` – Bravo May 20 '19 at 22:11
  • @RobinMoffatt when ran ```SELECT GETVARIABLE('SYSIBM.VERSION') FROM SYSIBM.SYSDUMMY1;``` got the result as ```DSN11015``` – Bravo May 20 '19 at 22:15

1 Answers1

0

I solved it using the release version 5.0.0 confluent jdbc source connector. I think the new changes (removing the extra comma) that's solves the issue would be included in the next release.