{"record":{"id":"9d5c82e3965e758a","repo":"prestodb/presto","slug":"no-port-number-specified","errorCode":null,"errorMessage":"No port number specified: ","messagePattern":"No port number specified: ","errorType":"exception","errorClass":"SQLException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDriverUri.java","lineNumber":369,"sourceCode":"\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);\n        }\n        catch (URISyntaxException e) {\n            throw new RuntimeException(e);\n        }\n    }\n","sourceCodeStart":351,"sourceCodeEnd":387,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDriverUri.java#L351-L387","documentation":"parseDriverUrl requires an explicit port; when the JDBC URL's authority has no port (URI.getPort() == -1) this SQLException is thrown with the URL, because the driver will not guess the coordinator port.","triggerScenarios":"Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDriverUri.java:369 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add the coordinator port to the URL, e.g. jdbc:presto://host:8080/catalog/schema"],"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"}