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

Snapshot fails when encountering null MySQL TIME fields

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 0.7.2
    • 0.7.1
    • mysql-connector
    • None

      It appears the new method SnapshotReader.readTimeField does not account for null values. It throws this exception and the snapshot fails.

      ```
      2017-12-20 11:51:26,115] ERROR Failed due to error: Aborting snapshot due to error when last running 'COMMIT': null (io.debezium.connector.mysql.SnapshotReader:157)
      org.apache.kafka.connect.errors.ConnectException
      at io.debezium.connector.mysql.AbstractReader.wrap(AbstractReader.java:178)
      at io.debezium.connector.mysql.AbstractReader.failed(AbstractReader.java:156)
      at io.debezium.connector.mysql.SnapshotReader.execute(SnapshotReader.java:664)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.NullPointerException
      at io.debezium.connector.mysql.SnapshotReader.readTimeField(SnapshotReader.java:164)
      at io.debezium.connector.mysql.SnapshotReader.readField(SnapshotReader.java:147)
      at io.debezium.connector.mysql.SnapshotReader.lambda$execute$12(SnapshotReader.java:532)
      at io.debezium.jdbc.JdbcConnection.query(JdbcConnection.java:389)
      at io.debezium.connector.mysql.SnapshotReader.execute(SnapshotReader.java:521)
      ... 1 more
      [2017-12-20 11:51:26,309] ERROR Task iready_snapper5_dbz-0 threw an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime.WorkerTask:148)
      org.apache.kafka.connect.errors.ConnectException
      at io.debezium.connector.mysql.AbstractReader.wrap(AbstractReader.java:178)
      at io.debezium.connector.mysql.AbstractReader.failed(AbstractReader.java:156)
      at io.debezium.connector.mysql.SnapshotReader.execute(SnapshotReader.java:664)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.NullPointerException
      at io.debezium.connector.mysql.SnapshotReader.readTimeField(SnapshotReader.java:164)
      at io.debezium.connector.mysql.SnapshotReader.readField(SnapshotReader.java:147)
      at io.debezium.connector.mysql.SnapshotReader.lambda$execute$12(SnapshotReader.java:532)
      at io.debezium.jdbc.JdbcConnection.query(JdbcConnection.java:389)
      at io.debezium.connector.mysql.SnapshotReader.execute(SnapshotReader.java:521)
      ... 1 more
      ```

              pgoransson@cainc.com Peter Goransson (Inactive)
              pgoransson@cainc.com Peter Goransson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: