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

java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • 1.2.0.Alpha1
    • 1.0.0.Final
    • mysql-connector
    • None
    • Hide

      What is strange that similar alter hasn't crashed other connectors. Any ideas what to check more?

      DDL logged into history topic:

      "ddl" : "CREATE TABLE `revenue_payments` (\n  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,\n  `subscription_id` int(11) unsigned DEFAULT NULL,\n  `price` double NOT NULL DEFAULT '0',\n  `due_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n  `revenue_movement_type` int(11) unsigned NOT NULL,\n  `payment_type` int(11) unsigned NOT NULL,\n  `description` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n  PRIMARY KEY (`id`),\n  KEY `revenue_movement_type` (`revenue_movement_type`),\n  KEY `payment_type` (`payment_type`),\n  CONSTRAINT `revenue_payments_ibfk_1` FOREIGN KEY (`revenue_movement_type`) REFERENCES `revenue_movement_types` (`id`),\n  CONSTRAINT `revenue_payments_ibfk_2` FOREIGN KEY (`payment_type`) REFERENCES `payment_types` (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci"
      

      In debug log level this is just before:

      2020-01-30 10:03:10,896 DEBUG  MySQL|company_db_2061|task  Applying: CREATE TABLE `revenue_payments` (
        `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
        `subscription_id` int(11) unsigned DEFAULT NULL,
        `price` double NOT NULL DEFAULT '0',
        `due_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
        `revenue_movement_type` int(11) unsigned NOT NULL,
        `payment_type` int(11) unsigned NOT NULL,
        `description` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
        PRIMARY KEY (`id`),
        KEY `revenue_movement_type` (`revenue_movement_type`),
        KEY `payment_type` (`payment_type`),
        CONSTRAINT `revenue_payments_ibfk_1` FOREIGN KEY (`revenue_movement_type`) REFERENCES `revenue_movement_types` (`id`),
        CONSTRAINT `revenue_payments_ibfk_2` FOREIGN KEY (`payment_type`) REFERENCES `payment_types` (`id`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci   [io.debezium.relational.history.KafkaDatabaseHistory]
      

      Error stack:

      job: RUNNING org.apache.kafka.connect.errors.ConnectException: java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]
       at io.debezium.connector.mysql.MySqlConnectorTask.start(MySqlConnectorTask.java:288)
       at io.debezium.connector.common.BaseSourceTask.start(BaseSourceTask.java:49)
       at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:208)
       at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:177)
       at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:227)
       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:834) 
      
       Caused by: java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]
       at java.sql/java.sql.Timestamp.valueOf(Timestamp.java:196)
       at io.debezium.connector.mysql.MySqlDefaultValueConverter.convertToTimestamp(MySqlDefaultValueConverter.java:161)
       at io.debezium.connector.mysql.MySqlDefaultValueConverter.convert(MySqlDefaultValueConverter.java:81)
       at io.debezium.connector.mysql.MySqlDefaultValueConverter.setColumnDefaultValue(MySqlDefaultValueConverter.java:279)
       at io.debezium.connector.mysql.antlr.listener.CreateTableParserListener.convertDefaultValueToSchemaType(CreateTableParserListener.java:144)
       at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
       at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
       at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654)
       at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
       at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
       at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
       at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
       at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
       at io.debezium.connector.mysql.antlr.listener.CreateTableParserListener.lambda$exitColumnCreateTable$1(CreateTableParserListener.java:73)
       at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.runIfNotNull(MySqlAntlrDdlParser.java:285)
       at io.debezium.connector.mysql.antlr.listener.CreateTableParserListener.exitColumnCreateTable(CreateTableParserListener.java:53)
       at io.debezium.ddl.parser.mysql.generated.MySqlParser$ColumnCreateTableContext.exitRule(MySqlParser.java:4530)
       at io.debezium.antlr.ProxyParseTreeListenerUtil.delegateExitRule(ProxyParseTreeListenerUtil.java:64)
       at io.debezium.connector.mysql.antlr.listener.MySqlAntlrDdlParserListener.exitEveryRule(MySqlAntlrDdlParserListener.java:106)
       at org.antlr.v4.runtime.tree.ParseTreeWalker.exitRule(ParseTreeWalker.java:48)
       at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:30)
       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:85)
       at io.debezium.relational.history.AbstractDatabaseHistory.lambda$recover$1(AbstractDatabaseHistory.java:114)
       at io.debezium.relational.history.KafkaDatabaseHistory.recoverRecords(KafkaDatabaseHistory.java:252)
       at io.debezium.relational.history.AbstractDatabaseHistory.recover(AbstractDatabaseHistory.java:81)
       at io.debezium.connector.mysql.MySqlSchema.loadHistory(MySqlSchema.java:250)
       at io.debezium.connector.mysql.MySqlTaskContext.loadHistory(MySqlTaskContext.java:164)
       at io.debezium.connector.mysql.MySqlConnectorTask.start(MySqlConnectorTask.java:109) ... 9 more	
      
      Show
      What is strange that similar alter hasn't crashed other connectors. Any ideas what to check more? DDL logged into history topic: "ddl" : "CREATE TABLE `revenue_payments` (\n `id` int (11) unsigned NOT NULL AUTO_INCREMENT,\n `subscription_id` int (11) unsigned DEFAULT NULL,\n `price` double NOT NULL DEFAULT '0' ,\n `due_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n `revenue_movement_type` int (11) unsigned NOT NULL,\n `payment_type` int (11) unsigned NOT NULL,\n `description` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n PRIMARY KEY (`id`),\n KEY `revenue_movement_type` (`revenue_movement_type`),\n KEY `payment_type` (`payment_type`),\n CONSTRAINT `revenue_payments_ibfk_1` FOREIGN KEY (`revenue_movement_type`) REFERENCES `revenue_movement_types` (`id`),\n CONSTRAINT `revenue_payments_ibfk_2` FOREIGN KEY (`payment_type`) REFERENCES `payment_types` (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" In debug log level this is just before: 2020-01-30 10:03:10,896 DEBUG MySQL|company_db_2061|task Applying: CREATE TABLE `revenue_payments` ( `id` int (11) unsigned NOT NULL AUTO_INCREMENT, `subscription_id` int (11) unsigned DEFAULT NULL, `price` double NOT NULL DEFAULT '0' , `due_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `revenue_movement_type` int (11) unsigned NOT NULL, `payment_type` int (11) unsigned NOT NULL, `description` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `revenue_movement_type` (`revenue_movement_type`), KEY `payment_type` (`payment_type`), CONSTRAINT `revenue_payments_ibfk_1` FOREIGN KEY (`revenue_movement_type`) REFERENCES `revenue_movement_types` (`id`), CONSTRAINT `revenue_payments_ibfk_2` FOREIGN KEY (`payment_type`) REFERENCES `payment_types` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci [io.debezium.relational.history.KafkaDatabaseHistory] Error stack: job: RUNNING org.apache.kafka.connect.errors.ConnectException: java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff] at io.debezium.connector.mysql.MySqlConnectorTask.start(MySqlConnectorTask.java:288) at io.debezium.connector.common.BaseSourceTask.start(BaseSourceTask.java:49) at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:208) at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:177) at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:227) 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:834) Caused by: java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff] at java.sql/java.sql.Timestamp.valueOf(Timestamp.java:196) at io.debezium.connector.mysql.MySqlDefaultValueConverter.convertToTimestamp(MySqlDefaultValueConverter.java:161) at io.debezium.connector.mysql.MySqlDefaultValueConverter.convert(MySqlDefaultValueConverter.java:81) at io.debezium.connector.mysql.MySqlDefaultValueConverter.setColumnDefaultValue(MySqlDefaultValueConverter.java:279) at io.debezium.connector.mysql.antlr.listener.CreateTableParserListener.convertDefaultValueToSchemaType(CreateTableParserListener.java:144) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) at io.debezium.connector.mysql.antlr.listener.CreateTableParserListener.lambda$exitColumnCreateTable$1(CreateTableParserListener.java:73) at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.runIfNotNull(MySqlAntlrDdlParser.java:285) at io.debezium.connector.mysql.antlr.listener.CreateTableParserListener.exitColumnCreateTable(CreateTableParserListener.java:53) at io.debezium.ddl.parser.mysql.generated.MySqlParser$ColumnCreateTableContext.exitRule(MySqlParser.java:4530) at io.debezium.antlr.ProxyParseTreeListenerUtil.delegateExitRule(ProxyParseTreeListenerUtil.java:64) at io.debezium.connector.mysql.antlr.listener.MySqlAntlrDdlParserListener.exitEveryRule(MySqlAntlrDdlParserListener.java:106) at org.antlr.v4.runtime.tree.ParseTreeWalker.exitRule(ParseTreeWalker.java:48) at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:30) 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:85) at io.debezium.relational.history.AbstractDatabaseHistory.lambda$recover$1(AbstractDatabaseHistory.java:114) at io.debezium.relational.history.KafkaDatabaseHistory.recoverRecords(KafkaDatabaseHistory.java:252) at io.debezium.relational.history.AbstractDatabaseHistory.recover(AbstractDatabaseHistory.java:81) at io.debezium.connector.mysql.MySqlSchema.loadHistory(MySqlSchema.java:250) at io.debezium.connector.mysql.MySqlTaskContext.loadHistory(MySqlTaskContext.java:164) at io.debezium.connector.mysql.MySqlConnectorTask.start(MySqlConnectorTask.java:109) ... 9 more

      1. connect-service.log.zip
        10.01 MB
      2. create_date.png
        create_date.png
        17 kB
      3. log.txt
        4 kB
      4. timestamp.png
        timestamp.png
        22 kB

            Unassigned Unassigned
            pimpelsang Eero Koplimets (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: