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

Timezone converter not working with NULL columns

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Blocker Blocker
    • None
    • 2.5.1.Final
    • oracle-connector
    • None
    • False
    • None
    • False
    • Critical

      What Debezium connector do you use and what version?

      Debezium Oracle connector version 2.5.1.Final

      What is the connector configuration?

      "transforms": "convertTimezone","transforms.convertTimezone.type": "io.debezium.transforms.TimezoneConverter","transforms.convertTimezone.converted.timezone": "Europe/Rome"

      What is the captured database version and mode of depoyment?

      On-premise Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
      Version 19.8.0.0.0 

      What behaviour do you expect?

      The timezone converter to handle correctly NULL time columns by writing NULL in the kafka event

      What behaviour do you see?

      An exception is arised when a NULL columns appears, and the connector crashes:

      org.apache.kafka.connect.errors.ConnectException: Tolerance exceeded in error handler
          at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execAndHandleError(RetryWithToleranceOperator.java:230)
          at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execute(RetryWithToleranceOperator.java:156)
          at org.apache.kafka.connect.runtime.TransformationChain.apply(TransformationChain.java:54)
          at org.apache.kafka.connect.runtime.AbstractWorkerSourceTask.sendRecords(AbstractWorkerSourceTask.java:401)
          at org.apache.kafka.connect.runtime.AbstractWorkerSourceTask.execute(AbstractWorkerSourceTask.java:367)
          at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:204)
          at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:259)
          at org.apache.kafka.connect.runtime.AbstractWorkerSourceTask.run(AbstractWorkerSourceTask.java:77)
          at org.apache.kafka.connect.runtime.isolation.Plugins.lambda$withClassLoader$1(Plugins.java:236)
          at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
          at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
          at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
          at java.base/java.lang.Thread.run(Thread.java:840)
      Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.Long.longValue()" because "fieldValue" is null
          at io.debezium.transforms.TimezoneConverter.getTimestampWithTimezone(TimezoneConverter.java:288)
          at io.debezium.transforms.TimezoneConverter.handleValueForField(TimezoneConverter.java:349)
          at io.debezium.transforms.TimezoneConverter.handleValueForFields(TimezoneConverter.java:341)
          at io.debezium.transforms.TimezoneConverter.handleStructs(TimezoneConverter.java:313)
          at io.debezium.transforms.TimezoneConverter.handleAllRecords(TimezoneConverter.java:514)
          at io.debezium.transforms.TimezoneConverter.apply(TimezoneConverter.java:137)
          at org.apache.kafka.connect.runtime.TransformationStage.apply(TransformationStage.java:57)
          at org.apache.kafka.connect.runtime.TransformationChain.lambda$apply$0(TransformationChain.java:54)
          at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execAndRetry(RetryWithToleranceOperator.java:180)
          at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execAndHandleError(RetryWithToleranceOperator.java:214)
          ... 13 more
       

      We need a fix super asap as this is blocking our production environment

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

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

      <Your answer>

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

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

      <Your answer>

      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)

      <Your answer>

            Unassigned Unassigned
            m.dilella@reply.it Michele Di Lella
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: