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

LogMiner causes DataException when DATE field is specified as NOT NULL

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.4.0.Final
    • 1.3.0.Final, 1.3.1.Final, 1.4.0.Alpha1, 1.4.0.Alpha2
    • oracle-connector
    • None

      A table that specifies a column that is DATE NOT NULL leads to:

      2020-11-20 15:57:25,655 ERROR  OracleConnectorIT||engine  Error while trying to run connector class 'io.debezium.connector.oracle.OracleConnector'   [io.debezium.connector.oracle.OracleConnectorIT]
      org.apache.kafka.connect.errors.ConnectException: An exception occurred in the change event producer. This connector will be stopped.
      	at io.debezium.pipeline.ErrorHandler.setProducerThrowable(ErrorHandler.java:42)
      	at io.debezium.connector.oracle.logminer.TransactionalBuffer.lambda$commit$1(TransactionalBuffer.java:208)
      	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:832)
      Caused by: org.apache.kafka.connect.errors.ConnectException: Error while processing event at offset {commit_scn=1547591, transaction_id=null, scn=1547590}
      	at io.debezium.pipeline.EventDispatcher.dispatchDataChangeEvent(EventDispatcher.java:225)
      	at io.debezium.connector.oracle.logminer.LogMinerQueryResultProcessor.lambda$processResult$0(LogMinerQueryResultProcessor.java:201)
      	at io.debezium.connector.oracle.logminer.TransactionalBuffer.lambda$commit$1(TransactionalBuffer.java:198)
      	... 3 more
      Caused by: org.apache.kafka.connect.errors.DataException: Invalid value: null used for required field: "REGISTERED", schema type: INT64
      	at org.apache.kafka.connect.data.ConnectSchema.validateValue(ConnectSchema.java:220)
      	at org.apache.kafka.connect.data.Struct.validate(Struct.java:233)
      	at org.apache.kafka.connect.data.ConnectSchema.validateValue(ConnectSchema.java:253)
      	at org.apache.kafka.connect.data.Struct.put(Struct.java:216)
      	at org.apache.kafka.connect.data.Struct.put(Struct.java:203)
      	at io.debezium.data.Envelope.create(Envelope.java:290)
      	at io.debezium.relational.RelationalChangeRecordEmitter.emitCreateRecord(RelationalChangeRecordEmitter.java:67)
      	at io.debezium.relational.RelationalChangeRecordEmitter.emitChangeRecords(RelationalChangeRecordEmitter.java:45)
      	at io.debezium.pipeline.EventDispatcher.dispatchDataChangeEvent(EventDispatcher.java:198)
      

      Earlier in the log the following exception is thrown:

      2020-11-20 15:57:15,519 ERROR  OracleConnectorIT||engine  Failed to properly convert data value for 'ORCLPDB1.DEBEZIUM.CUSTOMER.REGISTERED' of type DATE for row [10, Test, 1234.56, TO_DATE('2018-02-22 00:00:00', 'YYYY-MM-DD HH24:MI:SS')]:   [io.debezium.relational.TableSchemaBuilder]
      java.lang.IllegalArgumentException: Unexpected value for JDBC type 93 and column REGISTERED DATE NOT NULL: class=class java.lang.String
      	at io.debezium.jdbc.JdbcValueConverters.handleUnknownData(JdbcValueConverters.java:1247)
      	at io.debezium.jdbc.JdbcValueConverters.convertValue(JdbcValueConverters.java:1290)
      	at io.debezium.jdbc.JdbcValueConverters.convertTimestampToEpochMillis(JdbcValueConverters.java:460)
      	at io.debezium.connector.oracle.OracleValueConverters.convertTimestampToEpochMillis(OracleValueConverters.java:445)
      	at io.debezium.jdbc.JdbcValueConverters.lambda$converter$16(JdbcValueConverters.java:335)
      	at io.debezium.relational.TableSchemaBuilder.lambda$createValueGenerator$5(TableSchemaBuilder.java:264)
      	at io.debezium.relational.TableSchema.valueFromColumnData(TableSchema.java:141)
      	at io.debezium.relational.RelationalChangeRecordEmitter.emitCreateRecord(RelationalChangeRecordEmitter.java:66)
      	at io.debezium.relational.RelationalChangeRecordEmitter.emitChangeRecords(RelationalChangeRecordEmitter.java:45)
      	at io.debezium.pipeline.EventDispatcher.dispatchDataChangeEvent(EventDispatcher.java:198)
      	at io.debezium.connector.oracle.logminer.LogMinerQueryResultProcessor.lambda$processResult$0(LogMinerQueryResultProcessor.java:201)
      	at io.debezium.connector.oracle.logminer.TransactionalBuffer.lambda$commit$1(TransactionalBuffer.java:198)
      	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:832)
      

              ccranfor@redhat.com Chris Cranford
              ccranfor@redhat.com Chris Cranford
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: