Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-8221

Error writing data to target database. (Caused by: java.lang.RuntimeException: org.postgresql.util.PSQLException: The column index is out of range: 140, number of columns: 139.)

XMLWordPrintable

      In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.

      Bug report

      For bug reports, provide this information, please:

      What Debezium connector do you use and what version?

       
      debezium/connect:3.0.0.Beta1
      JdbcSinkConnector 3.0.0.Beta1 version 

      What is the connector configuration?

      JdbcSinkConnector works fine if I limit geometric columns with filter. If the filter is deleted and geometric columns are added, the above error will occur (PsqlException)

      {{}}

      { "name": "dm_la_spatial_unit", "config": { "connector.class": "io.debezium.connector.jdbc.JdbcSinkConnector", "tasks.max": "1", "connection.url": "jdbc:postgresql://consumer-database:5432/consumerdb", "connection.username": "consumer", "connection.password": "consumer", "insert.mode": "upsert", "delete.enabled": "true", "primary.key.mode": "record_key", "primary.key.fields": "id", "auto.create": "true", "auto.evolve": "true", "schema.evolution": "basic", "topics": "producer-server.innola.dm_la_spatial_unit", "transforms": "route,filter", "transforms.route.type": "org.apache.kafka.connect.transforms.RegexRouter", "transforms.route.regex": "producer-server.innola.(.*)", "transforms.route.replacement": "$1", "transforms.filter.type": "org.apache.kafka.connect.transforms.ReplaceField$Value", "transforms.filter.exclude": "geometry,refpoint_geometry,not_legal_geometry", "max.partition.fetch.bytes": "104858800", "errors.tolerance": "all", "key.converter": "org.apache.kafka.connect.json.JsonConverter", "key.converter.schemas.enable": "true", "value.converter": "org.apache.kafka.connect.json.JsonConverter", "value.converter.schemas.enable": "true" } }

      {{}}

      What is the captured database version and mode of deployment?

      (E.g. on-premises, with a specific cloud provider, etc.)
       
      Docker image: postgis/postgis:latest
       

      What behavior do you expect?

      The data in the Kafka message should go to the target database.

      What behavior do you see?

      The target database is creating the same table as the source database, but no data is being written to it.

      Do you see the same behaviour using the latest released Debezium version?

      (Ideally, also verify with latest Alpha/Beta/CR version)

      I tried it on version 2.7.0 and version 3.0.0.Beta1 of JdbcSinkConnector.

      Do you have the connector logs, ideally from start till finish?

      (You might be asked later to provide DEBUG/TRACE level log)

      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    | 2024-09-09 12:09:39,628 ERROR  ||  Failed to process record: Failed to process a sink record   [io.debezium.connector.jdbc.JdbcSinkConnectorTask]
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    | org.apache.kafka.connect.errors.ConnectException: Failed to process a sink record
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcChangeEventSink.flushBuffer(JdbcChangeEventSink.java:229)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcChangeEventSink.lambda$flushBuffers$2(JdbcChangeEventSink.java:207)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:986)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcChangeEventSink.flushBuffers(JdbcChangeEventSink.java:207)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcChangeEventSink.execute(JdbcChangeEventSink.java:159)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcSinkConnectorTask.put(JdbcSinkConnectorTask.java:128)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerSinkTask.deliverMessages(WorkerSinkTask.java:605)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerSinkTask.poll(WorkerSinkTask.java:344)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerSinkTask.iteration(WorkerSinkTask.java:246)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:215)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:225)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:280)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.isolation.Plugins.lambda$withClassLoader$1(Plugins.java:237)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.lang.Thread.run(Thread.java:1583)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    | Caused by: java.lang.RuntimeException: org.postgresql.util.PSQLException: The column index is out of range: 140, number of columns: 139.
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.PreparedStatementQueryBinder.bind(PreparedStatementQueryBinder.java:41)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.lang.Iterable.forEach(Iterable.java:75)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.RecordWriter.bindFieldValuesToQuery(RecordWriter.java:158)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.RecordWriter.bindNonKeyValuesToQuery(RecordWriter.java:141)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.RecordWriter.bindValues(RecordWriter.java:115)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.RecordWriter.lambda$processBatch$0(RecordWriter.java:75)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.hibernate.jdbc.WorkExecutor.executeWork(WorkExecutor.java:39)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.hibernate.internal.AbstractSharedSessionContract.lambda$doWork$4(AbstractSharedSessionContract.java:1042)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.coordinateWork(JdbcCoordinatorImpl.java:303)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.hibernate.internal.AbstractSharedSessionContract.doWork(AbstractSharedSessionContract.java:1053)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.hibernate.internal.AbstractSharedSessionContract.doWork(AbstractSharedSessionContract.java:1041)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.RecordWriter.write(RecordWriter.java:51)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcChangeEventSink.flushBuffer(JdbcChangeEventSink.java:222)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     ... 17 more
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    | Caused by: org.postgresql.util.PSQLException: The column index is out of range: 140, number of columns: 139.
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.postgresql.jdbc.PgPreparedStatement.setNull(PgPreparedStatement.java:219)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.postgresql.jdbc.PgPreparedStatement.setObject(PgPreparedStatement.java:984)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.setObject(NewProxyPreparedStatement.java:821)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.PreparedStatementQueryBinder.bind(PreparedStatementQueryBinder.java:37)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     ... 29 more
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    | 2024-09-09 12:09:39,644 ERROR  ||  JDBC sink connector failure   [io.debezium.connector.jdbc.JdbcSinkConnectorTask]
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    | org.apache.kafka.connect.errors.ConnectException: Failed to process a sink record
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcChangeEventSink.flushBuffer(JdbcChangeEventSink.java:229)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcChangeEventSink.lambda$flushBuffers$2(JdbcChangeEventSink.java:207)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:986)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcChangeEventSink.flushBuffers(JdbcChangeEventSink.java:207)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcChangeEventSink.execute(JdbcChangeEventSink.java:159)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcSinkConnectorTask.put(JdbcSinkConnectorTask.java:128)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerSinkTask.deliverMessages(WorkerSinkTask.java:605)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerSinkTask.poll(WorkerSinkTask.java:344)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerSinkTask.iteration(WorkerSinkTask.java:246)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:215)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:225)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:280)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.isolation.Plugins.lambda$withClassLoader$1(Plugins.java:237)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.lang.Thread.run(Thread.java:1583)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    | Caused by: java.lang.RuntimeException: org.postgresql.util.PSQLException: The column index is out of range: 140, number of columns: 139.
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.PreparedStatementQueryBinder.bind(PreparedStatementQueryBinder.java:41)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.lang.Iterable.forEach(Iterable.java:75)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.RecordWriter.bindFieldValuesToQuery(RecordWriter.java:158)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.RecordWriter.bindNonKeyValuesToQuery(RecordWriter.java:141)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.RecordWriter.bindValues(RecordWriter.java:115)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.RecordWriter.lambda$processBatch$0(RecordWriter.java:75)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.hibernate.jdbc.WorkExecutor.executeWork(WorkExecutor.java:39)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.hibernate.internal.AbstractSharedSessionContract.lambda$doWork$4(AbstractSharedSessionContract.java:1042)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.coordinateWork(JdbcCoordinatorImpl.java:303)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.hibernate.internal.AbstractSharedSessionContract.doWork(AbstractSharedSessionContract.java:1053)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.hibernate.internal.AbstractSharedSessionContract.doWork(AbstractSharedSessionContract.java:1041)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.RecordWriter.write(RecordWriter.java:51)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcChangeEventSink.flushBuffer(JdbcChangeEventSink.java:222)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     ... 17 more
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    | Caused by: org.postgresql.util.PSQLException: The column index is out of range: 140, number of columns: 139.
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.postgresql.jdbc.PgPreparedStatement.setNull(PgPreparedStatement.java:219)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.postgresql.jdbc.PgPreparedStatement.setObject(PgPreparedStatement.java:984)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.setObject(NewProxyPreparedStatement.java:821)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.PreparedStatementQueryBinder.bind(PreparedStatementQueryBinder.java:37)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     ... 29 more
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    | 2024-09-09 12:09:39,644 ERROR  ||  WorkerSinkTask{id=dm_la_spatial_unit0-0} Task threw an uncaught and unrecoverable exception. Task is being killed and will not recover until manually restarted. Error: JDBC sink connector failure   [org.apache.kafka.connect.runtime.WorkerSinkTask]
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    | org.apache.kafka.connect.errors.ConnectException: JDBC sink connector failure
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcSinkConnectorTask.put(JdbcSinkConnectorTask.java:121)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerSinkTask.deliverMessages(WorkerSinkTask.java:605)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerSinkTask.poll(WorkerSinkTask.java:344)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerSinkTask.iteration(WorkerSinkTask.java:246)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:215)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:225)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:280)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.isolation.Plugins.lambda$withClassLoader$1(Plugins.java:237)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.lang.Thread.run(Thread.java:1583)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    | Caused by: org.apache.kafka.connect.errors.ConnectException: Failed to process a sink record
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcChangeEventSink.flushBuffer(JdbcChangeEventSink.java:229)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcChangeEventSink.lambda$flushBuffers$2(JdbcChangeEventSink.java:207)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:986)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcChangeEventSink.flushBuffers(JdbcChangeEventSink.java:207)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcChangeEventSink.execute(JdbcChangeEventSink.java:159)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcSinkConnectorTask.put(JdbcSinkConnectorTask.java:128)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     ... 12 more
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    | Caused by: java.lang.RuntimeException: org.postgresql.util.PSQLException: The column index is out of range: 140, number of columns: 139.
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.PreparedStatementQueryBinder.bind(PreparedStatementQueryBinder.java:41)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.lang.Iterable.forEach(Iterable.java:75)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.RecordWriter.bindFieldValuesToQuery(RecordWriter.java:158)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.RecordWriter.bindNonKeyValuesToQuery(RecordWriter.java:141)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.RecordWriter.bindValues(RecordWriter.java:115)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.RecordWriter.lambda$processBatch$0(RecordWriter.java:75)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.hibernate.jdbc.WorkExecutor.executeWork(WorkExecutor.java:39)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.hibernate.internal.AbstractSharedSessionContract.lambda$doWork$4(AbstractSharedSessionContract.java:1042)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.coordinateWork(JdbcCoordinatorImpl.java:303)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.hibernate.internal.AbstractSharedSessionContract.doWork(AbstractSharedSessionContract.java:1053)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.hibernate.internal.AbstractSharedSessionContract.doWork(AbstractSharedSessionContract.java:1041)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.RecordWriter.write(RecordWriter.java:51)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcChangeEventSink.flushBuffer(JdbcChangeEventSink.java:222)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     ... 17 more
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    | Caused by: org.postgresql.util.PSQLException: The column index is out of range: 140, number of columns: 139.
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.postgresql.jdbc.PgPreparedStatement.setNull(PgPreparedStatement.java:219)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.postgresql.jdbc.PgPreparedStatement.setObject(PgPreparedStatement.java:984)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.setObject(NewProxyPreparedStatement.java:821)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.PreparedStatementQueryBinder.bind(PreparedStatementQueryBinder.java:37)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     ... 29 more
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    | 2024-09-09 12:09:39,645 ERROR  ||  WorkerSinkTask{id=dm_la_spatial_unit0-0} Task threw an uncaught and unrecoverable exception. Task is being killed and will not recover until manually restarted   [org.apache.kafka.connect.runtime.WorkerTask]
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    | org.apache.kafka.connect.errors.ConnectException: Exiting WorkerSinkTask due to unrecoverable exception.
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerSinkTask.deliverMessages(WorkerSinkTask.java:635)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerSinkTask.poll(WorkerSinkTask.java:344)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerSinkTask.iteration(WorkerSinkTask.java:246)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:215)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:225)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:280)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.isolation.Plugins.lambda$withClassLoader$1(Plugins.java:237)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.lang.Thread.run(Thread.java:1583)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    | Caused by: org.apache.kafka.connect.errors.ConnectException: JDBC sink connector failure
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcSinkConnectorTask.put(JdbcSinkConnectorTask.java:121)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.apache.kafka.connect.runtime.WorkerSinkTask.deliverMessages(WorkerSinkTask.java:605)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     ... 11 more
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    | Caused by: org.apache.kafka.connect.errors.ConnectException: Failed to process a sink record
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcChangeEventSink.flushBuffer(JdbcChangeEventSink.java:229)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcChangeEventSink.lambda$flushBuffers$2(JdbcChangeEventSink.java:207)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:986)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcChangeEventSink.flushBuffers(JdbcChangeEventSink.java:207)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcChangeEventSink.execute(JdbcChangeEventSink.java:159)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcSinkConnectorTask.put(JdbcSinkConnectorTask.java:128)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     ... 12 more
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    | Caused by: java.lang.RuntimeException: org.postgresql.util.PSQLException: The column index is out of range: 140, number of columns: 139.
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.PreparedStatementQueryBinder.bind(PreparedStatementQueryBinder.java:41)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at java.base/java.lang.Iterable.forEach(Iterable.java:75)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.RecordWriter.bindFieldValuesToQuery(RecordWriter.java:158)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.RecordWriter.bindNonKeyValuesToQuery(RecordWriter.java:141)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.RecordWriter.bindValues(RecordWriter.java:115)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.RecordWriter.lambda$processBatch$0(RecordWriter.java:75)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.hibernate.jdbc.WorkExecutor.executeWork(WorkExecutor.java:39)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.hibernate.internal.AbstractSharedSessionContract.lambda$doWork$4(AbstractSharedSessionContract.java:1042)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.coordinateWork(JdbcCoordinatorImpl.java:303)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.hibernate.internal.AbstractSharedSessionContract.doWork(AbstractSharedSessionContract.java:1053)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.hibernate.internal.AbstractSharedSessionContract.doWork(AbstractSharedSessionContract.java:1041)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.RecordWriter.write(RecordWriter.java:51)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.JdbcChangeEventSink.flushBuffer(JdbcChangeEventSink.java:222)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     ... 17 more
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    | Caused by: org.postgresql.util.PSQLException: The column index is out of range: 140, number of columns: 139.
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.postgresql.jdbc.PgPreparedStatement.setNull(PgPreparedStatement.java:219)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at org.postgresql.jdbc.PgPreparedStatement.setObject(PgPreparedStatement.java:984)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.setObject(NewProxyPreparedStatement.java:821)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     at io.debezium.connector.jdbc.PreparedStatementQueryBinder.bind(PreparedStatementQueryBinder.java:37)
      debezium_connect.1.s101tfiyuuno@avaz-srv-node2    |     ... 29 more

      How to reproduce the issue using our tutorial deployment?

      <Your answer>

      Feature request or enhancement

      For feature requests or enhancements, provide this information, please:

      Which use case/requirement will be addressed by the proposed feature?

      <Your answer>

      Implementation ideas (optional)

      I think this problem is related to geometric columns, because if I leave out 3 geometric columns in the table by filtering columns in the configuration, the jdbcSinkConnector task works without problems, but if one geometric column is added, the above problem occurs again.

        1. test.json
          20 kB
          Abdurahmon Abduraimov

              ccranfor@redhat.com Chris Cranford
              abduraimovabdurahmon Abdurahmon Abduraimov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: