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.