{"record":{"id":"54a3de45cc7d6548","repo":"apache/seatunnel","slug":"no-suitable-driver-54a3de","errorCode":"NO_SUITABLE_DRIVER","errorMessage":"No suitable driver found for the configured JDBC URL","messagePattern":"No suitable driver found for the configured JDBC URL","errorType":"error_code","errorClass":"JdbcConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/dsql/DsqlJdbcConnectionProvider.java","lineNumber":80,"sourceCode":"        if (isConnectionValid()) {\n            return connection;\n        }\n        Driver driver = getLoadedDriver();\n        Properties info = new Properties();\n        if (jdbcConfig.getUsername().isPresent()) {\n            info.setProperty(\"user\", jdbcConfig.getUsername().get());\n        }\n        String url = jdbcConfig.getUrl();\n        JdbcUrlUtil.UrlInfo urlInfo = JdbcUrlUtil.getUrlInfo(url);\n        info.setProperty(\"password\", generateAuthToken(urlInfo.getHost()));\n\n        info.putAll(jdbcConfig.getProperties());\n\n        connection = driver.connect(url, info);\n        if (connection == null) {\n            // Throw same exception as DriverManager.getConnection when no driver found to match\n            // caller expectation.\n            throw new JdbcConnectorException(\n                    JdbcConnectorErrorCode.NO_SUITABLE_DRIVER,\n                    \"No suitable driver found for the configured JDBC URL\");\n        }\n\n        connection.setAutoCommit(jdbcConfig.isAutoCommit());\n\n        return connection;\n    }\n\n    private String generateAuthToken(String clusterEndpoint) {\n        JdbcConnectionConfig jdbcConfig = super.getJdbcConfig();\n        GenerateAuthTokenRequest tokenGenerator =\n                GenerateAuthTokenRequest.builder()\n                        .hostname(clusterEndpoint)\n                        .region(Region.of(jdbcConfig.getRegion()))\n                        .credentialsProvider(this.provider)\n                        .build();\n","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/dsql/DsqlJdbcConnectionProvider.java#L62-L98","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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)."],"exampleFix":"// before (no driver jar present)\nurl = \"jdbc:postgresql:dsql-host/db\"\n// after (install driver then)\n# cp dsql-jdbc-<ver>.jar $SEATUNNEL_HOME/connectors/connector-jdbc/lib/\nurl = \"jdbc:postgresql:dsql-host/db\"","handlingStrategy":"validation","validationCode":"// precheck driver availability\nClass.forName(driverClassName);\nif (java.sql.DriverManager.getDrivers() == null || !url.startsWith(\"jdbc:postgresql:\")) throw new IllegalStateException(\"driver or url misconfigured\");","typeGuard":"boolean driverAvailable(String cls) { try { Class.forName(cls); return true; } catch (ClassNotFoundException e) { return false; } }","tryCatchPattern":"try { conn = provider.getOrEstablishConnection(); } catch (JdbcConnectorException e) { if (e.getErrorCode() == JdbcConnectorErrorCode.NO_SUITABLE_DRIVER) { /* install driver jar, fix url, retry once */ } else throw e; }","preventionTips":["Ship the Dsql JDBC driver jar with your deployment","Verify url prefix matches the installed driver","Run a connectivity smoke test before job submission"],"tags":["jdbc","dsql","driver","connection"],"backgroundTag":"no-suitable-driver","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"}