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

Debezium does not expect a year larger than 9999

    Details

      Description

      PostgreSQL date type supports a year larger then 9999,but postgresql-connector do not expect a year larger than 9999,I get the following error:

      [2019-04-16 13:11:20,612] ERROR Cannot parse time/date value '10007-06-07', expected format 'yyyy-MM-dd[ GG]' (io.debezium.connector.postgresql.connection.wal2json.DateTimeFormat$ISODateTimeFormat:140)
      [2019-04-16 13:11:20,613] ERROR unexpected exception while streaming logical changes (io.debezium.connector.postgresql.RecordsStreamProducer:138)
      org.apache.kafka.connect.errors.ConnectException: java.time.format.DateTimeParseException: Text '10007-06-07' could not be parsed at index 0
      at io.debezium.connector.postgresql.connection.wal2json.DateTimeFormat$ISODateTimeFormat.format(DateTimeFormat.java:141)
      at io.debezium.connector.postgresql.connection.wal2json.DateTimeFormat$ISODateTimeFormat.date(DateTimeFormat.java:111)
      at io.debezium.connector.postgresql.connection.wal2json.Wal2JsonReplicationMessage.getValue(Wal2JsonReplicationMessage.java:251)
      at io.debezium.connector.postgresql.connection.wal2json.Wal2JsonReplicationMessage$1.getValue(Wal2JsonReplicationMessage.java:140)
      at io.debezium.connector.postgresql.RecordsStreamProducer.columnValues(RecordsStreamProducer.java:439)
      at io.debezium.connector.postgresql.RecordsStreamProducer.process(RecordsStreamProducer.java:249)
      at io.debezium.connector.postgresql.RecordsStreamProducer.lambda$streamChanges$2(RecordsStreamProducer.java:126)
      at io.debezium.connector.postgresql.connection.wal2json.NonStreamingWal2JsonMessageDecoder.processMessage(NonStreamingWal2JsonMessageDecoder.java:62)
      at io.debezium.connector.postgresql.connection.PostgresReplicationConnection$1.deserializeMessages(PostgresReplicationConnection.java:218)
      at io.debezium.connector.postgresql.connection.PostgresReplicationConnection$1.read(PostgresReplicationConnection.java:203)
      at io.debezium.connector.postgresql.RecordsStreamProducer.streamChanges(RecordsStreamProducer.java:126)
      at io.debezium.connector.postgresql.RecordsStreamProducer.lambda$start$1(RecordsStreamProducer.java:112)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: java.time.format.DateTimeParseException: Text '10007-06-07' could not be parsed at index 0
      at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1949)
      at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1851)
      at java.time.LocalDate.parse(LocalDate.java:400)
      at io.debezium.connector.postgresql.connection.wal2json.DateTimeFormat$ISODateTimeFormat.lambda$date$1(DateTimeFormat.java:111)
      at io.debezium.connector.postgresql.connection.wal2json.DateTimeFormat$ISODateTimeFormat.format(DateTimeFormat.java:138)
      ... 16 more
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  bmiedlar Bartosz Miedlar
                  Reporter:
                  heqian888 he qian
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: