{"record":{"id":"e59751892c387bef","repo":"prestodb/presto","slug":"invalid-server-url-e59751","errorCode":null,"errorMessage":"Invalid server URL: ","messagePattern":"Invalid server URL: ","errorType":"exception","errorClass":"ClientException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/QueryExecutor.java","lineNumber":53,"sourceCode":"    private static final JsonCodec<ServerInfo> SERVER_INFO_CODEC = jsonCodec(ServerInfo.class);\n\n    private final OkHttpClient httpClient;\n\n    public QueryExecutor(OkHttpClient httpClient)\n    {\n        this.httpClient = requireNonNull(httpClient, \"httpClient is null\");\n    }\n\n    public StatementClient startQuery(ClientSession session, String query)\n    {\n        return newStatementClient(httpClient, session, query);\n    }\n\n    public ServerInfo getServerInfo(URI server)\n    {\n        HttpUrl url = HttpUrl.get(server);\n        if (url == null) {\n            throw new ClientException(\"Invalid server URL: \" + server);\n        }\n        url = url.newBuilder().encodedPath(\"/v1/info\").build();\n\n        Request request = new Request.Builder().url(url).build();\n\n        JsonResponse<ServerInfo> response = JsonResponse.execute(SERVER_INFO_CODEC, httpClient, request);\n        if (!response.hasValue()) {\n            throw new RuntimeException(format(\"Request to %s failed: %s [Error: %s]\", server, response, response.getResponseBody()));\n        }\n        return response.getValue();\n    }\n}\n","sourceCodeStart":35,"sourceCodeEnd":66,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/QueryExecutor.java#L35-L66","documentation":"getServerInfo in QueryExecutor converts the given server URI to an OkHttp HttpUrl; when HttpUrl.get(server) returns null the URI is not a valid absolute HTTP(S) URL, so this ClientException is thrown. The faulting input is the malformed coordinator URL supplied in the JDBC connection string.","triggerScenarios":"Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/QueryExecutor.java:53 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the coordinator URL in the JDBC string is an absolute http:// or https:// URL","Check for missing scheme, stray characters, or whitespace in the configured URL","Validate the URL with java.net.URI before constructing the connection"],"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"}