apache/seatunnel · error · JdbcConnectorException
NO_SUITABLE_DRIVER
NO_SUITABLE_DRIVER
Error message
No suitable driver found for the configured JDBC URL
What it means
DsqlJdbcConnectionProvider.getOrEstablishConnection calls Driver.connect(url, info); when the driver returns null it means no registered driver accepted the URL, so this JdbcConnectorException with NO_SUITABLE_DRIVER is thrown, mirroring DriverManager's behavior.
Source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/dsql/DsqlJdbcConnectionProvider.java:80
if (isConnectionValid()) {
return connection;
}
Driver driver = getLoadedDriver();
Properties info = new Properties();
if (jdbcConfig.getUsername().isPresent()) {
info.setProperty("user", jdbcConfig.getUsername().get());
}
String url = jdbcConfig.getUrl();
JdbcUrlUtil.UrlInfo urlInfo = JdbcUrlUtil.getUrlInfo(url);
info.setProperty("password", generateAuthToken(urlInfo.getHost()));
info.putAll(jdbcConfig.getProperties());
connection = driver.connect(url, info);
if (connection == null) {
// Throw same exception as DriverManager.getConnection when no driver found to match
// caller expectation.
throw new JdbcConnectorException(
JdbcConnectorErrorCode.NO_SUITABLE_DRIVER,
"No suitable driver found for the configured JDBC URL");
}
connection.setAutoCommit(jdbcConfig.isAutoCommit());
return connection;
}
private String generateAuthToken(String clusterEndpoint) {
JdbcConnectionConfig jdbcConfig = super.getJdbcConfig();
GenerateAuthTokenRequest tokenGenerator =
GenerateAuthTokenRequest.builder()
.hostname(clusterEndpoint)
.region(Region.of(jdbcConfig.getRegion()))
.credentialsProvider(this.provider)
.build();
View on GitHub (pinned to cf67b549a7)
Solutions
- Place the correct Dsql JDBC driver jar in the connector's driver directory (or $SEATUNNEL_HOME/plugins) and retry.
- Verify the url in the JDBC config matches the driver (e.g. jdbc:postgresql:... dsql URL).
- Check driver load logs and confirm the driver's Driver class is registered (jdbc driver jar present in classpath).
Example fix
// before (no driver jar present) url = "jdbc:postgresql:dsql-host/db" // after (install driver then) # cp dsql-jdbc-<ver>.jar $SEATUNNEL_HOME/connectors/connector-jdbc/lib/ url = "jdbc:postgresql:dsql-host/db"
Defensive patterns
Strategy: validation
Validate before calling
// precheck driver availability
Class.forName(driverClassName);
if (java.sql.DriverManager.getDrivers() == null || !url.startsWith("jdbc:postgresql:")) throw new IllegalStateException("driver or url misconfigured"); Type guard
boolean driverAvailable(String cls) { try { Class.forName(cls); return true; } catch (ClassNotFoundException e) { return false; } } Try / catch
try { conn = provider.getOrEstablishConnection(); } catch (JdbcConnectorException e) { if (e.getErrorCode() == JdbcConnectorErrorCode.NO_SUITABLE_DRIVER) { /* install driver jar, fix url, retry once */ } else throw e; } Prevention
- Ship the Dsql JDBC driver jar with your deployment
- Verify url prefix matches the installed driver
- Run a connectivity smoke test before job submission
When it happens
Trigger: Establishing a Dsql JDBC connection where the JDBC driver class for the configured URL is not loaded/registered on the classpath, so driver.connect() returns null.
Common situations: Missing Dsql driver jar in the plugin directory (install-plugin.sh not run or driver not in resources), wrong URL prefix, or driver shading conflicts.
Related errors
- NO_SUITABLE_DRIVER
- NO_SUITABLE_DRIVER
- CREATE_DRIVER_FAILED
- The JDBC source statement returned no connection. Closing th
- Failed to get connection, interrupted while doing another at
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/54a3de45cc7d6548.
Report an issue: GitHub.