Debezium mysql Connector conversion error

we are facing the below conversion error when we are trying to pull data from mysql table to kafka topic using debezium connector.

2021-09-08 06:52:17,032 WARN Invalid value '0000-00-00 00:00:00' stored in column 'date_entered' of table 'TabName' converted to empty value (io.debezium.connector.mysql.MySqlValueConverters) [debezium-mysqlconnector-ola_load-change-event-source-coordinator]
2021-09-08 06:52:17,033 ERROR Failed to properly convert key value for 'blackbox_prod.ola_bookings.date_entered' of type DATETIME for row [2160507548, [98, 97, 99, 99, 55, 55, 101, 52, 45, 57, 48, 48, 100, 45, 52, 56, 100, 97, 45, 57, 97, 98, 102, 45, 97, 50, 56, 101, 56, 48, 99, 98, 51, 101, 53, 101], null, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, null, [111, 110, 116, 105, 109, 101], null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0.000000, null, null, null, null, [105, 110, 100, 105, 97], [109, 117, 109, 98, 97, 105], null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0.000000, null, null, null, null, null, [99, 97, 115, 104], null, null, 0, null, 2020-03-19 11:46:56.0, null, null, 0, null, 0, 0, null, 1, null, null, null, null, null, null, 1, null, 0.0, null, [97, 108, 108], null]: (io.debezium.relational.TableSchemaBuilder) [debezium-mysqlconnector-ola_load-change-event-source-coordinator]
org.apache.kafka.connect.errors.DataException: Invalid Java object for schema type STRING: class java.lang.Long for field: "date_entered"
	at org.apache.kafka.connect.data.ConnectSchema.validateValue(ConnectSchema.java:241)
	at org.apache.kafka.connect.data.Struct.put(Struct.java:216)
	at io.debezium.relational.TableSchemaBuilder.lambda$createKeyGenerator$3(TableSchemaBuilder.java:193)
	at io.debezium.relational.TableSchema.keyFromColumnData(TableSchema.java:130)
	at io.debezium.relational.RelationalChangeRecordEmitter.emitReadRecord(RelationalChangeRecordEmitter.java:84)
	at io.debezium.relational.RelationalChangeRecordEmitter.emitChangeRecords(RelationalChangeRecordEmitter.java:48)
	at io.debezium.pipeline.EventDispatcher.dispatchSnapshotEvent(EventDispatcher.java:155)
	at io.debezium.relational.RelationalSnapshotChangeEventSource.createDataEventsForTable(RelationalSnapshotChangeEventSource.java:377)
	at io.debezium.relational.RelationalSnapshotChangeEventSource.createDataEvents(RelationalSnapshotChangeEventSource.java:305)
	at io.debezium.relational.RelationalSnapshotChangeEventSource.doExecute(RelationalSnapshotChangeEventSource.java:138)
	at io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.execute(AbstractSnapshotChangeEventSource.java:71)
	at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:110)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

and the second issue was after failing at this point debezium connector not getting stopped ,instead it’s t write data again and again into kafka topic from starting of the table.

Please help in fixing this issue.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.