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

java.lang.NullPointerException while handling DROP column query

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.9.0.CR1
    • 1.9.0.Alpha2
    • mysql-connector
    • None

      Debezium crashes with the following error:

      2022-02-23 09:47:48,697 ERROR  ||  Unexpected exception while processing record 'ConsumerRecord(topic = debezium-history-v17-company-db2128, partition = 0, leaderEpoch = 7, offset = 44356, CreateTime = 1639278973058, serialized key size = -1, serialized value size = 19523, headers = RecordHeaders(headers = [], isReadOnly = false), key = null, value = {
        "source" : {
          "server" : "company_db_2128"
        },
        "position" : {
          "transaction_id" : null,
          "ts_sec" : 1639278973,
          "file" : "mysql-bin.000409",
          "pos" : 682029242,
          "gtids" : "03d252c7-aeff-11ea-9cd6-fa163e6a80ad:1-352789339,fe2c1442-aefe-11ea-ba69-fa163ea24550:1-18673814",
          "server_id" : 21281
        },
        "databaseName" : "company_6276066",
        "ddl" : "ALTER /** CID=7bf8d44f-4daa-4c1d-ae3a-2669ddff2e1e;METHOD=modules\\custom_fields\\RegularColumn\\RegularColumn->dropCustomField;REQUEST=DELETE /v1/dealFields/#; */ TABLE `leads` DROP `c0351d49ef16cda7d38b3907a94fb564568fefac`",
        "tableChanges" : [ {
          "type" : "ALTER",
          "id" : "\"company_6276066\".\"leads\"",
          "table" : {
            "defaultCharsetName" : "utf8",
            "primaryKeyColumnNames" : [ "id" ],
            "columns" : [ {
              "name" : "id",
              "jdbcType" : 1,
              "typeName" : "CHAR",
              "typeExpression" : "CHAR",
              "charsetName" : "ascii",
              "length" : 36,
              "position" : 1,
              "optional" : false,
              "autoIncremented" : false,
              "generated" : false
            }, {
      
      <...>
      
            } ]
          }
        } ]
      })'   [io.debezium.relational.history.KafkaDatabaseHistory]
      java.lang.NullPointerException
          at io.debezium.relational.TableEditorImpl.removeColumn(TableEditorImpl.java:167)
          at io.debezium.connector.mysql.antlr.listener.AlterTableParserListener.lambda$enterAlterByDropColumn$12(AlterTableParserListener.java:243)
          at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.runIfNotNull(MySqlAntlrDdlParser.java:358)
          at io.debezium.connector.mysql.antlr.listener.AlterTableParserListener.enterAlterByDropColumn(AlterTableParserListener.java:242)
          at io.debezium.ddl.parser.mysql.generated.MySqlParser$AlterByDropColumnContext.enterRule(MySqlParser.java:14968)
          at io.debezium.antlr.ProxyParseTreeListenerUtil.delegateEnterRule(ProxyParseTreeListenerUtil.java:46)
          at io.debezium.connector.mysql.antlr.listener.MySqlAntlrDdlParserListener.enterEveryRule(MySqlAntlrDdlParserListener.java:89)
          at org.antlr.v4.runtime.tree.ParseTreeWalker.enterRule(ParseTreeWalker.java:41)
          at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:25)
          at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
          at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
          at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
          at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
          at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:28)
          at io.debezium.antlr.AntlrDdlParser.parse(AntlrDdlParser.java:87)
          at io.debezium.relational.history.AbstractDatabaseHistory.lambda$recover$2(AbstractDatabaseHistory.java:146)
          at io.debezium.relational.history.KafkaDatabaseHistory.recoverRecords(KafkaDatabaseHistory.java:323)
          at io.debezium.relational.history.AbstractDatabaseHistory.recover(AbstractDatabaseHistory.java:112)
          at io.debezium.relational.history.DatabaseHistory.recover(DatabaseHistory.java:158)
          at io.debezium.relational.HistorizedRelationalDatabaseSchema.recover(HistorizedRelationalDatabaseSchema.java:62)
          at io.debezium.schema.HistorizedDatabaseSchema.recover(HistorizedDatabaseSchema.java:38)
          at io.debezium.connector.mysql.MySqlConnectorTask.validateAndLoadDatabaseHistory(MySqlConnectorTask.java:369)
          at io.debezium.connector.mysql.MySqlConnectorTask.start(MySqlConnectorTask.java:108)
          at io.debezium.connector.common.BaseSourceTask.start(BaseSourceTask.java:130)
          at org.apache.kafka.connect.runtime.WorkerSourceTask.initializeAndStart(WorkerSourceTask.java:225)
          at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:186)
          at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:243)
          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) 

              vjuranek@redhat.com Vojtech Juranek
              vkassenbaev Valeriy Kassenbaev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: