{"record":{"id":"b162b77f6982815c","repo":"prestodb/presto","slug":"invalid-jdbc-url","errorCode":null,"errorMessage":"Invalid JDBC URL: ","messagePattern":"Invalid JDBC URL: ","errorType":"validation","errorClass":"SQLException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDriverUri.java","lineNumber":363,"sourceCode":"                List<String> parts = ARG_SPLITTER.splitToList(queryArg);\n                if (result.put(parts.get(0), parts.get(1)) != null) {\n                    throw new SQLException(format(\"Connection property '%s' is in URL multiple times\", parts.get(0)));\n                }\n            }\n        }\n\n        return result;\n    }\n\n    private static URI parseDriverUrl(String url)\n            throws SQLException\n    {\n        URI uri;\n        try {\n            uri = new URI(url.substring(JDBC_URL_START.length()));\n        }\n        catch (URISyntaxException e) {\n            throw new SQLException(\"Invalid JDBC URL: \" + url, e);\n        }\n        if (isNullOrEmpty(uri.getHost())) {\n            throw new SQLException(\"No host specified: \" + url);\n        }\n        if (uri.getPort() == -1) {\n            throw new SQLException(\"No port number specified: \" + url);\n        }\n        if ((uri.getPort() < 1) || (uri.getPort() > 65535)) {\n            throw new SQLException(\"Invalid port number: \" + url);\n        }\n        return uri;\n    }\n\n    private URI buildHttpUri()\n    {\n        String scheme = useSecureConnection ? \"https\" : \"http\";\n        try {\n            return new URI(scheme, null, address.getHost(), address.getPort(), null, null, null);","sourceCodeStart":345,"sourceCodeEnd":381,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDriverUri.java#L345-L381","documentation":"parseDriverUrl strips the jdbc:presto: prefix and parses the remainder as a URI; a URISyntaxException (malformed URL, illegal characters) is converted to this SQLException carrying the offending URL, so the driver fails fast on unparseable connection strings.","triggerScenarios":"Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDriverUri.java:363 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the JDBC URL syntax, e.g. jdbc:presto://host:port/catalog/schema","URL-encode illegal characters (spaces, unescaped delimiters) in the URL"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}