{"record":{"id":"a5e69a258c9447b4","repo":"apache/seatunnel","slug":"invalid-yashandb-jdbc-url-s-url-must-start-wi","errorCode":null,"errorMessage":"Invalid YashanDB JDBC URL: [%s], URL must start with '%s'","messagePattern":"Invalid YashanDB JDBC URL: \\[(.+?)\\], URL must start with '(.+?)'","errorType":"validation","errorClass":"OptionValidationException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/yashandb/YashanDbCatalogFactory.java","lineNumber":80,"sourceCode":"     * YashanDB-specific URL validator that rejects any JDBC URL not starting with {@code\n     * jdbc:yasdb://} before the catalog is created, providing fail-fast behaviour at configuration\n     * parsing time.\n     */\n    static class YashanDbUrlValidator implements ConditionExtension<String> {\n        @Override\n        public String description() {\n            return \"YashanDB JDBC URL must start with '\"\n                    + YASHANDB_URL_PREFIX\n                    + \"' (e.g. jdbc:yasdb://host:port/database)\";\n        }\n\n        @Override\n        public boolean evaluate(ReadonlyConfig config, String url) {\n            if (url == null || url.trim().isEmpty()) {\n                return false;\n            }\n            if (!url.startsWith(YASHANDB_URL_PREFIX)) {\n                throw new OptionValidationException(\n                        String.format(\n                                \"Invalid YashanDB JDBC URL: [%s], URL must start with '%s'\",\n                                url, YASHANDB_URL_PREFIX));\n            }\n            try {\n                JdbcUrlUtil.UrlInfo info = JdbcUrlUtil.getUrlInfo(url);\n                return info.getHost() != null && !info.getHost().isEmpty();\n            } catch (IllegalArgumentException e) {\n                throw new OptionValidationException(\n                        String.format(\n                                \"Invalid YashanDB JDBC URL format: [%s], \"\n                                        + \"expected pattern: jdbc:yasdb://host:port[/database][?properties]\",\n                                url));\n            }\n        }\n    }\n}\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/catalog/yashandb/YashanDbCatalogFactory.java#L62-L98","documentation":"The YashanDB JDBC URL validator in YashanDbCatalogFactory.evaluate() requires the URL to start with the YASHANDB_URL_PREFIX; otherwise it throws OptionValidationException 'Invalid YashanDB JDBC URL: [%s], URL must start with <prefix>'. This fail-fast check ensures only YashanDB-scheme URLs are matched to this dialect before further parsing via JdbcUrlUtil.getUrlInfo.","triggerScenarios":"Configuring a YashanDB catalog/connection whose url option does not begin with the required YashanDB prefix (e.g. jdbc:yashandb://) — wrong scheme, typo, empty prefix handling, or a URL intended for another database routed to the yashandb factory.","commonSituations":"Using jdbc:oracle:// or generic jdbc: URLs for a YashanDB instance (YashanDB is Oracle-compatible, tempting users to reuse Oracle URLs); typos like jdbc:yashan://; extra leading whitespace that survives into the trimmed check.","solutions":["Prefix the URL with the required YashanDB scheme exactly as stated in the message (check YASHANDB_URL_PREFIX, e.g. jdbc:yashandb://).","Confirm there is no leading whitespace/BOM in the config value before the scheme.","If the instance is actually another database, configure the correct dialect/factory instead of yashandb.","After fixing the prefix, ensure host/port parse correctly via JdbcUrlUtil (the next validation step)."],"exampleFix":"// before\nurl = \"jdbc:oracle://yashan-host:1688\"\n// after\nurl = \"jdbc:yashandb://yashan-host:1688\"","handlingStrategy":"validation","validationCode":"// java\nString url = config.get(\"url\");\nif (url == null || !url.trim().startsWith(\"jdbc:yashandb://\")) {\n    throw new IllegalArgumentException(\"YashanDB url must start with jdbc:yashandb://\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the yashandb scheme, not Oracle or generic jdbc URLs, even though YashanDB is Oracle-compatible.","Trim the config value to avoid leading whitespace before the prefix.","Verify host/port parse with JdbcUrlUtil after the prefix check passes."],"tags":["yashandb","jdbc-url","config-validation"],"backgroundTag":"invalid-url-format","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}