{"record":{"id":"cf1b492bcb5913a4","repo":"prestodb/presto","slug":"schema-name-is-empty","errorCode":null,"errorMessage":"Schema name is empty: ","messagePattern":"Schema name is empty: ","errorType":"exception","errorClass":"SQLException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDriverUri.java","lineNumber":419,"sourceCode":"\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\n        for (String key : urlProperties.keySet()) {\n            if (suppliedProperties.containsKey(key)) {\n                throw new SQLException(format(\"Connection property '%s' is both in the URL and an argument\", key));\n            }\n        }\n","sourceCodeStart":401,"sourceCodeEnd":437,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDriverUri.java#L401-L437","documentation":"initCatalogAndSchema checks the optional second path segment: when a schema position exists in the URL path but its value is empty (e.g. /catalog/), this SQLException is thrown with the URI, since an explicit-but-empty schema name is ambiguous.","triggerScenarios":"Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDriverUri.java:419 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Supply a schema name after the catalog, e.g. jdbc:presto://host:port/catalog/schema","Drop the trailing slash so only the catalog is specified"],"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"}