{"record":{"id":"9b497b2329c9b83a","repo":"apache/seatunnel","slug":"invalid-oracle-jdbc-url-format-s-expected-pat","errorCode":null,"errorMessage":"Invalid Oracle JDBC URL format: [%s], expected pattern: jdbc:oracle:thin:@host:port/service","messagePattern":"Invalid Oracle JDBC URL format: \\[(.+?)\\], expected pattern: jdbc:oracle:thin:@host:port/service","errorType":"validation","errorClass":"OptionValidationException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/oracle/OracleCatalogFactory.java","lineNumber":79,"sourceCode":"    }\n\n    static class OracleUrlValidator implements ConditionExtension<String> {\n        @Override\n        public String description() {\n            return \"Oracle JDBC URL must contain a service name (e.g. jdbc:oracle:thin:@host:port/service)\";\n        }\n\n        @Override\n        public boolean evaluate(ReadonlyConfig config, String url) {\n            if (url == null || url.trim().isEmpty()) {\n                return false;\n            }\n            try {\n                JdbcUrlUtil.UrlInfo info = OracleURLParser.parse(url);\n                return StringUtils.isNotBlank(info.getHost())\n                        && info.getDefaultDatabase().isPresent();\n            } catch (IllegalArgumentException e) {\n                throw new OptionValidationException(\n                        String.format(\n                                \"Invalid Oracle JDBC URL format: [%s], \"\n                                        + \"expected pattern: jdbc:oracle:thin:@host:port/service\",\n                                url));\n            }\n        }\n    }\n}\n","sourceCodeStart":61,"sourceCodeEnd":88,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/oracle/OracleCatalogFactory.java#L61-L88","documentation":"OracleCatalogFactory.evaluate validates Oracle JDBC URLs by parsing them with OracleURLParser; when parsing throws IllegalArgumentException it rethrows OptionValidationException with a message showing the URL and expected format jdbc:oracle:thin:@host:port/service. It means the configured URL is not a service-name thin URL the parser accepts.","triggerScenarios":"Configuring an Oracle/OceanBase-Oracle url like jdbc:oracle:thin:@(DESCRIPTION=...), SID-style @host:port:SID, empty host, or missing service name, then running URL validation during catalog/connector option evaluation.","commonSituations":"Using TNS descriptor URLs, legacy SID URLs, typos in host/port, missing /service suffix, or copying a URL with extra whitespace.","solutions":["Rewrite the URL to thin service-name form: jdbc:oracle:thin:@host:port/service","Convert SID URLs to service-name form (or register a parser path that supports SID)","Trim whitespace/quotes from the configured url option","If TNS descriptors are required, extend OracleURLParser to accept them"],"exampleFix":"// before\nurl = \"jdbc:oracle:thin:@orclhost:1521:ORCLCDB\";\n// after\nurl = \"jdbc:oracle:thin:@orclhost:1521/ORCLPDB1\";","handlingStrategy":"validation","validationCode":"// validate the URL before configuring the catalog\nString url = cfg.getString(\"url\");\njava.util.regex.Pattern p = java.util.regex.Pattern.compile(\"jdbc:oracle:thin:@[A-Za-z0-9._-]+:\\\\d+/[A-Za-z0-9_$#]+\");\nif (!p.matcher(url.trim()).matches()) { throw new IllegalArgumentException(\"Oracle URL must be jdbc:oracle:thin:@host:port/service\"); }","typeGuard":"boolean isThinServiceUrl(String url) {\n    return url != null && url.trim().matches(\"jdbc:oracle:thin:@[^:]+:\\\\d+/.+\");\n}","tryCatchPattern":"try { factory.evaluate(...); } catch (OptionValidationException e) { /* re-prompt/fix url option */ }","preventionTips":["Always use thin service-name URLs (slash form), not SID colon form or TNS descriptors","Trim whitespace and quotes from the configured url","Document the required URL pattern next to the config option"],"tags":["jdbc","oracle","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-14T05:17:10.506Z"}