{"record":{"id":"c3d16b61a98f42ab","repo":"prestodb/presto","slug":"catalog-name-is-empty","errorCode":null,"errorMessage":"Catalog name is empty: ","messagePattern":"Catalog name is empty: ","errorType":"exception","errorClass":"SQLException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDriverUri.java","lineNumber":413,"sourceCode":"\n        // remove first slash\n        if (!path.startsWith(\"/\")) {\n            throw new SQLException(\"Path does not start with a slash: \" + uri);\n        }\n        path = path.substring(1);\n\n        List<String> parts = Splitter.on(\"/\").splitToList(path);\n        // remove last item due to a trailing slash\n        if (parts.get(parts.size() - 1).isEmpty()) {\n            parts = parts.subList(0, parts.size() - 1);\n        }\n\n        if (parts.size() > 2) {\n            throw new SQLException(\"Invalid path segments in URL: \" + uri);\n        }\n\n        if (parts.get(0).isEmpty()) {\n            throw new SQLException(\"Catalog name is empty: \" + uri);\n        }\n        catalog = parts.get(0);\n\n        if (parts.size() > 1) {\n            if (parts.get(1).isEmpty()) {\n                throw new SQLException(\"Schema name is empty: \" + uri);\n            }\n            schema = parts.get(1);\n        }\n    }\n\n    private static Properties mergeConnectionProperties(URI uri, Properties driverProperties)\n            throws SQLException\n    {\n        Map<String, String> defaults = ConnectionProperties.getDefaults();\n        Map<String, String> urlProperties = parseParameters(uri.getQuery());\n        Map<String, String> suppliedProperties = Maps.fromProperties(driverProperties);\n","sourceCodeStart":395,"sourceCodeEnd":431,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDriverUri.java#L395-L431","documentation":"initCatalogAndSchema requires a non-empty first path segment as the catalog; an empty catalog segment (e.g. a path like '//schema' or leading double slash) triggers this SQLException naming the URI, preventing an unnamed catalog from being set.","triggerScenarios":"Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDriverUri.java:413 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a catalog name in the URL path, e.g. jdbc:presto://host:port/catalog","Omit the path entirely if no default catalog is intended"],"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"}