Let's suppose there are two connectors deployed
- using JDBC driver (Debezium MySQL connector)
- using PostgreSQL JDBC driver (JDBC sink).
Connector 1 is started first - it executes a statement
As a result a DriverManager calls ServiceLoader and searches for all JDBC drivers. The postgres driver from connector 2) is found associated with classloader from connector 1).
Connector 2 is started after that - it executes a statement
DriverManager finds the connector that was loaded in step before but becuase the classloader is different - now we use classloader 2) so it refuses to load the class and no JDBC driver is found.