{"record":{"id":"060252ee53de3108","repo":"apache/seatunnel","slug":"connect-failed-060252","errorCode":"CONNECT_FAILED","errorMessage":"Failed to load Databend JDBC driver: ${e.getMessage()}","messagePattern":"Failed to load Databend JDBC driver: (.+?)","errorType":"error_code","errorClass":"DatabendConnectorException","httpStatus":null,"severity":"critical","filePath":"seatunnel-connectors-v2/connector-databend/src/main/java/org/apache/seatunnel/connectors/seatunnel/databend/util/DatabendUtil.java","lineNumber":57,"sourceCode":"import java.sql.ResultSet;\nimport java.sql.SQLException;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Properties;\nimport java.util.stream.Collectors;\n\n@Slf4j\npublic class DatabendUtil {\n\n    public static final String DRIVER_NAME = \"com.databend.jdbc.DatabendDriver\";\n\n    static {\n        try {\n            Class.forName(DRIVER_NAME);\n        } catch (ClassNotFoundException e) {\n            throw new DatabendConnectorException(\n                    DatabendConnectorErrorCode.CONNECT_FAILED,\n                    \"Failed to load Databend JDBC driver: \" + e.getMessage(),\n                    e);\n        }\n    }\n\n    /** Create a JDBC connection using the provided config */\n    public static Connection createConnection(DatabendSourceConfig config) throws SQLException {\n        try {\n            return DriverManager.getConnection(config.getUrl(), config.getProperties());\n        } catch (SQLException e) {\n            throw new DatabendConnectorException(\n                    DatabendConnectorErrorCode.CONNECT_FAILED,\n                    \"Failed to create connection to Databend: \" + e.getMessage(),\n                    e);\n        }\n    }\n","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-databend/src/main/java/org/apache/seatunnel/connectors/seatunnel/databend/util/DatabendUtil.java#L39-L75","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nclasspath missing: databend-jdbc-x.y.z.jar\n// after\n$SEATUNNEL_HOME/connectors/connector-databend/lib/databend-jdbc-0.3.4.jar present on all nodes","handlingStrategy":"validation","validationCode":"try { Class.forName(\"com.databend.jdbc.DatabendDriver\"); } catch (ClassNotFoundException e) { throw new IllegalStateException(\"databend-jdbc jar missing from classpath\", e); }","typeGuard":null,"tryCatchPattern":"try { job = submitJob(...); } catch (DatabendConnectorException e) {\n    if (\"CONNECT_FAILED\".equals(e.getErrorCode()) && e.getMessage().contains(\"Failed to load Databend JDBC driver\")) {\n        throw new IllegalStateException(\"Install databend-jdbc jar in connector lib dir\", e);\n    }\n    throw e;\n}","preventionTips":["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"],"tags":["jdbc","databend","classpath","driver"],"backgroundTag":"class-not-found","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}