{"record":{"id":"b13d0f96fbe99f3e","repo":"apache/seatunnel","slug":"invalid-yashandb-jdbc-url-format-s-expected-p","errorCode":null,"errorMessage":"Invalid YashanDB JDBC URL format: [%s], expected pattern: jdbc:yasdb://host:port[/database][?properties]","messagePattern":"Invalid YashanDB JDBC URL format: \\[(.+?)\\], expected pattern: jdbc:yasdb://host:port\\[/database\\]\\[\\?properties\\]","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":89,"sourceCode":"                    + \"' (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":71,"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#L71-L98","documentation":"YashanDbCatalogFactory.checkValidURL (via JdbcUrlUtil.getUrlInfo) cannot parse the configured YashanDB JDBC URL, so it throws an OptionValidationException instead of silently continuing. The URL must follow jdbc:yasdb://host:port[/database][?properties]. This guard runs early so users get a clear config error rather than a driver connection failure later.","triggerScenarios":"Calling the YashanDB catalog/table-path validation with a url that is null/blank, lacks the jdbc:yasdb:// prefix, omits host or port, or has a malformed query/property section.","commonSituations":"Typo in the scheme (jdbc:yashandb:// or jdbc:oracle://), missing port, copy-pasted URL with spaces or quotes from YAML, URL containing unescaped '&' or missing '?', using an Oracle-style SID URL for YashanDB.","solutions":["Fix the URL to exactly jdbc:yasdb://host:port[/database][?properties], e.g. jdbc:yasdb://192.168.1.10:1688/mydb","Verify the scheme is jdbc:yasdb:// (not jdbc:yashandb:// or another vendor prefix)","Check for stray whitespace, quotes, or newline characters picked up from YAML/HOCON config","If properties are appended, ensure they start with ? and are URL-encoded"],"exampleFix":"// before\nString url = \"jdbc:yashandb://localhost:1688\";\n// after\nString url = \"jdbc:yasdb://localhost:1688/mydb\";","handlingStrategy":"validation","validationCode":"String url = (String) options.get(\"url\");\nif (url == null || !url.startsWith(\"jdbc:yasdb://\")) {\n    throw new IllegalArgumentException(\"YashanDB url must start with jdbc:yasdb://\");\n}\njava.net.URI.create(url.substring(\"jdbc:\".length()));","typeGuard":"static boolean isValidYashanUrl(String url) {\n    return url != null && url.matches(\"jdbc:yasdb://[^:/\\\\s]+:\\\\d+(/[^?\\\\s]*)?(\\\\?.*)?\");\n}","tryCatchPattern":"try {\n    catalog.validateUrl(url);\n} catch (OptionValidationException e) {\n    LOG.error(\"Bad YashanDB url: {}\", e.getMessage());\n    throw new ConfigException(e);\n}","preventionTips":["Store the full jdbc:yasdb://host:port/db URL in one config variable","Lint config files for the yasdb scheme before submitting the job","URL-encode any query properties","Avoid hand-editing URLs per environment; use templates"],"tags":["jdbc","config-validation","url"],"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-14T11:17:12.474Z"}