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

Value xxx cannot be converted to TIMESTAMP

    XMLWordPrintable

Details

    • False
    • False

    Description

      Hi,

      I am getting an exception when i try to capture CDC changes from JTDS Sql Server Db. My Connector Configuration is 

       

      {  "name": "my-connector",   
      "config": {      
      "connector.class": "io.debezium.connector.sqlserver.SqlServerConnector",   
      "database.hostname": "xxx",  
      "database.port": "1433", 
      "database.user": "xxx",   
      "database.password": "xxx",    
      "database.connection.factory.class":"io.github.zhangyuan.debezium.sqlserver.connection.factory.JtdsConnectionFactory",    
      "database.server.id": "3011",      
      "database.server.name": "dbz1",    
      "database.dbname": "xxx",    
      "table.include.list": "xxx",    
      "snapshot.mode": "initial",    
      "snapshot.locking.mode": "none",    
      "database.history.kafka.bootstrap.servers": "xxx",      
      "database.history.kafka.topic": "xxx",      
      "plugin.path": "/usr/share/java/debezium-mssql-connect/",    
      "database.serverTimezone": "UTC",    
      "include.query": "true",    
      "sanitize.field.names": "true",    
      "tombstones.on.delete": "false",    
      "key.converter.schemas.enable": "true",    
      "key.converter": "org.apache.kafka.connect.json.JsonConverter",    
      "key.converter.schema.registry.url": "xxx",    
      "value.converter": "io.confluent.connect.avro.AvroConverter",    
      "value.converter.schema.registry.url": "xxx",    
      "transforms": "change_schema_metadata,route_cdc_topic,route_schema",    
      "transforms.route_cdc_topic.type": "io.debezium.transforms.ByLogicalTableRouter",    "transforms.route_cdc_topic.topic.regex": "xxx",    
      "transforms.route_cdc_topic.topic.replacement": "xxx",    
      "transforms.route_schema.type": "io.debezium.transforms.ByLogicalTableRouter",    "transforms.route_schema.topic.regex": "dbz1",    
      "transforms.route_schema.topic.replacement": "xxx.Schema",    
      "transforms.change_schema_metadata.type": "com.optum.rqns.ftm.kafka.custom.transforms.SchemaMetadata",    "transforms.change_schema_metadata.record.namespace": "xxx",    "transforms.change_schema_metadata.record.names": "xxx"  
      }}

      The bulk load or snapshot occurs without any issue. But when i do some updates in the table, I get the following exception. 

       

       

      java.sql.SQLException: Value 2021-12-05 08:29:21.830 -06:00 cannot be converted to TIMESTAMP. at net.sourceforge.jtds.jdbc.Support.convert(Support.java:516) at net.sourceforge.jtds.jdbc.JtdsResultSet.getTimestamp(JtdsResultSet.java:1182) at io.debezium.connector.sqlserver.SourceTimestampMode$1.getTimestamp(SourceTimestampMode.java:30) at io.debezium.connector.sqlserver.SqlServerStreamingChangeEventSource.lambda$execute$1(SqlServerStreamingChangeEventSource.java:266) at io.debezium.jdbc.JdbcConnection.prepareQuery(JdbcConnection.java:609) at io.debezium.connector.sqlserver.SqlServerConnection.getChangesForTables(SqlServerConnection.java:279) at io.debezium.connector.sqlserver.SqlServerStreamingChangeEventSource.execute(SqlServerStreamingChangeEventSource.java:170) at io.debezium.connector.sqlserver.SqlServerStreamingChangeEventSource.execute(SqlServerStreamingChangeEventSource.java:59) at io.debezium.pipeline.ChangeEventSourceCoordinator.streamEvents(ChangeEventSourceCoordinator.java:166) at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:127) 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)

      I am using JTDS connection factory as mentioned in the connector. I tried to check if this is some issue with some column with invalid data, but this is not the case. 

      Please help me resolve this issue

       

       

      Attachments

        1. ddl
          5 kB
        2. ddl-1
          0.3 kB

        Activity

          People

            Unassigned Unassigned
            knaman Naman Kumar (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: