apache/seatunnel · warning
Failed to load JDBC driver {}
Error message
Failed to load JDBC driver {} What it means
JdbcSinkWriter.initMultiTableResourceManager() creates the Hikari connection pool and first loads the JDBC driver via Class.forName(driverName). Load failure is WARN-logged, not thrown; the pool is still configured and later connection creation will fail with 'No suitable driver'.
Source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/sink/JdbcSinkWriter.java:138
connectionProvider,
jdbcSinkConfig,
tableSchema,
databaseTableSchema)
.build();
configureOutputFormatForRowErrorHandling();
if (context != null) {
context.registerFlushAction(this::timerFlush);
}
}
@Override
public MultiTableResourceManager<ConnectionPoolManager> initMultiTableResourceManager(
int tableSize, int queueSize) {
HikariDataSource ds = new HikariDataSource();
try {
Class.forName(jdbcSinkConfig.getJdbcConnectionConfig().getDriverName());
} catch (Exception e) {
log.warn(
"Failed to load JDBC driver {}",
jdbcSinkConfig.getJdbcConnectionConfig().getDriverName(),
e);
}
ds.setIdleTimeout(30 * 1000);
ds.setMaximumPoolSize(queueSize);
ds.setJdbcUrl(jdbcSinkConfig.getJdbcConnectionConfig().getUrl());
ds.setDriverClassName(jdbcSinkConfig.getJdbcConnectionConfig().getDriverName());
if (jdbcSinkConfig.getJdbcConnectionConfig().getUsername().isPresent()) {
ds.setUsername(jdbcSinkConfig.getJdbcConnectionConfig().getUsername().get());
}
if (jdbcSinkConfig.getJdbcConnectionConfig().getPassword().isPresent()) {
ds.setPassword(jdbcSinkConfig.getJdbcConnectionConfig().getPassword().get());
}
ds.setAutoCommit(jdbcSinkConfig.getJdbcConnectionConfig().isAutoCommit());
applyConnectionValidation(ds, jdbcSinkConfig.getJdbcConnectionConfig());
jdbcSinkConfig.getJdbcConnectionConfig().getProperties().forEach(ds::addDataSourceProperty);
return new JdbcMultiTableResourceManager(new ConnectionPoolManager(ds));View on GitHub (pinned to cf67b549a7)
Solutions
- Add the JDBC driver jar to the worker classpath
- Fix driver_name to the correct FQCN
- Verify the jar exists on all worker nodes, not just the client
Example fix
// before driver_name = "com.microsoft.sqlserver.jdbc.SQLServerDriver" // jar missing // after # copy mssql-jdbc-*.jar to $SEATUNNEL_HOME/lib then restart workers
Defensive patterns
Strategy: validation
Validate before calling
// verify driver before opening pools
try {
Class.forName(driverName);
} catch (ClassNotFoundException e) {
throw new IllegalStateException("Driver missing: " + driverName);
} Prevention
- Distribute driver jars to every worker node
- Validate FQCN against the shipped driver version
- Test connection pool init in a pre-deploy smoke test
When it happens
Trigger: Writer initialization with multi-table resource manager while driver-name class is absent from the classpath (missing driver jar, wrong class name, shaded path issues).
Common situations: Driver jar not installed for the engine/worker nodes; typo in driver_name; using a driver compiled for an incompatible JDK.
Related errors
- Failed to load MySQL JDBC driver
- Failed to load JDBC driver {}
- Failed to load JDBC driver {}
- DRIVER_NOT_FOUND
- CONNECT_FAILED
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/c4039ab5564be7a7.
Report an issue: GitHub.