apache/seatunnel · critical · DatabendConnectorException
CONNECT_FAILED
CONNECT_FAILED
Error message
Failed to load Databend JDBC driver: ${e.getMessage()} What it means
DatabendUtil's static initializer loads the Databend JDBC driver class com.databend.jdbc.DatabendDriver via Class.forName the first time the utility class is used. If the driver is not on the classpath, a DatabendConnectorException with code CONNECT_FAILED is thrown immediately, before any connection attempt. This is a classpath/dependency problem, not a connectivity problem.
Source
Thrown at seatunnel-connectors-v2/connector-databend/src/main/java/org/apache/seatunnel/connectors/seatunnel/databend/util/DatabendUtil.java:57
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.stream.Collectors;
@Slf4j
public class DatabendUtil {
public static final String DRIVER_NAME = "com.databend.jdbc.DatabendDriver";
static {
try {
Class.forName(DRIVER_NAME);
} catch (ClassNotFoundException e) {
throw new DatabendConnectorException(
DatabendConnectorErrorCode.CONNECT_FAILED,
"Failed to load Databend JDBC driver: " + e.getMessage(),
e);
}
}
/** Create a JDBC connection using the provided config */
public static Connection createConnection(DatabendSourceConfig config) throws SQLException {
try {
return DriverManager.getConnection(config.getUrl(), config.getProperties());
} catch (SQLException e) {
throw new DatabendConnectorException(
DatabendConnectorErrorCode.CONNECT_FAILED,
"Failed to create connection to Databend: " + e.getMessage(),
e);
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Install the Databend JDBC driver jar into the connector's lib directory (e.g. via sh bin/install-plugin.sh or manually copying databend-jdbc-<version>.jar to $SEATUNNEL_HOME/connectors/connector-databend/lib)
- Verify the jar is present on every node (workers) not just the submitter
- Check that the driver jar version matches what the connector build expects and that the jar is not corrupted
- If running on a cluster, pass the driver via --jar or place it in the engine's plugin/classpath config
Example fix
// before classpath missing: databend-jdbc-x.y.z.jar // after $SEATUNNEL_HOME/connectors/connector-databend/lib/databend-jdbc-0.3.4.jar present on all nodes
Defensive patterns
Strategy: validation
Validate before calling
try { Class.forName("com.databend.jdbc.DatabendDriver"); } catch (ClassNotFoundException e) { throw new IllegalStateException("databend-jdbc jar missing from classpath", e); } Try / catch
try { job = submitJob(...); } catch (DatabendConnectorException e) {
if ("CONNECT_FAILED".equals(e.getErrorCode()) && e.getMessage().contains("Failed to load Databend JDBC driver")) {
throw new IllegalStateException("Install databend-jdbc jar in connector lib dir", e);
}
throw e;
} Prevention
- Run install-plugin.sh after install so driver jars are fetched for connector-databend
- Verify the driver jar exists on every cluster node, not just the client
- Pin the driver version in your deployment scripts to avoid silent upgrades
When it happens
Trigger: First use of any Databend source/sink when the databend-jdbc driver jar is absent from the plugin/connector classpath; a mismatched or corrupted driver jar; shading/classloader isolation hiding the driver from the connector's classloader.
Common situations: Driver jar not downloaded by install-plugin.sh; connector run on a Flink/Spark cluster where the driver jar was only placed on the client; wrong driver version incompatible with the connector.
Related errors
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/060252ee53de3108.
Report an issue: GitHub.