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

Connection Factory is not used when validating SQL Server Connector

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 1.7.0.CR1
    • 1.6.2.Final, 1.7.0.Beta1
    • sqlserver-connector
    • None
    • False
    • False

    Description

      Debezium allows the user to specify the `database.connection.factory.class` to use non default connection factory. But when during the SQL server connector's creation, it ignores the specified connection factory class but uses the default one.

      After investigation, I think the cause is that in `SqlServerConnector.java`,  the method `connect`  creates `SqlServerConnection` without `classLoaderSupplier`. The way to fix is to use the same to way to create SqlServerConnection for `dataConnection` and `metadataConnection` in `SqlServerConnectorTask`, by passing `() -> getClass().getClassLoader()` and `Collections.emptySet()`.

       

      How did I find this issue?

      I'm trying to use windows authentication from Linux to SQL server but debezium does not have native support for it. Use jTDS is an feasible appraoch. As the connection string is harded code in debezium, I create a new connection factory with jTDS (https://github.com/zhangyuan/debezium-sqlserver-jtds-connection-factory) .

       

      The issue occurs at least  on 1.6.2 and latest 1.7.0.Beta. But I think it's been for a while.

      Attachments

        Activity

          People

            Unassigned Unassigned
            zhangyuan1 Yuan Zhang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: