{"record":{"id":"991d15674cf68f23","repo":"prestodb/presto","slug":"jdbc-error","errorCode":"JDBC_ERROR","errorMessage":"Failed to find remote schema name: ${e.message}","messagePattern":"Failed to find remote schema name: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"presto-base-jdbc/src/main/java/com/facebook/presto/plugin/jdbc/BaseJdbcClient.java","lineNumber":684,"sourceCode":"                    \"'case-insensitive-name-matching' is deprecated. Use of this configuration value may lead to query failures. \" +\n                            \"Please switch to using 'case-sensitive-name-matching' for proper case sensitivity behavior.\"));\n            try {\n                Map<String, String> mapping = remoteSchemaNames.getIfPresent(identity);\n                if (mapping != null && !mapping.containsKey(schemaName)) {\n                    // This might be a schema that has just been created. Force reload.\n                    mapping = null;\n                }\n                if (mapping == null) {\n                    mapping = listSchemasByLowerCase(connection);\n                    remoteSchemaNames.put(identity, mapping);\n                }\n                String remoteSchema = mapping.get(schemaName);\n                if (remoteSchema != null) {\n                    return remoteSchema;\n                }\n            }\n            catch (RuntimeException e) {\n                throw new PrestoException(JDBC_ERROR, \"Failed to find remote schema name: \" + firstNonNull(e.getMessage(), e), e);\n            }\n        }\n\n        try {\n            DatabaseMetaData metadata = connection.getMetaData();\n            if (metadata.storesUpperCaseIdentifiers() && !caseSensitiveNameMatchingEnabled) {\n                return schemaName.toUpperCase(ENGLISH);\n            }\n            return schemaName;\n        }\n        catch (SQLException e) {\n            throw new PrestoException(JDBC_ERROR, e);\n        }\n    }\n\n    protected Map<String, String> listSchemasByLowerCase(Connection connection)\n    {\n        return listSchemas(connection).stream()","sourceCodeStart":666,"sourceCodeEnd":702,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-base-jdbc/src/main/java/com/facebook/presto/plugin/jdbc/BaseJdbcClient.java#L666-L702","documentation":"toRemoteSchemaName() translates a Presto schema name to the remote database's stored identifier, optionally consulting a name-mapping file. Any RuntimeException raised while resolving that mapping is wrapped as PrestoException(JDBC_ERROR, \"Failed to find remote schema name: ...\").","triggerScenarios":"Case-sensitive name matching is enabled and loading/parsing the configured mapping (name-matching patterns or mapping file) throws while resolving the schema; e.g. malformed regex in a mapping rule or unreadable mapping source.","commonSituations":"Typo or invalid regex in the mapping file configured for case-sensitive-name-matching; file permissions preventing the coordinator/worker from reading the mapping; enabling case-sensitive-name-matching without provisioning the mapping correctly.","solutions":["Fix the underlying cause shown in the wrapped e.message (e.g. invalid regex, unreadable mapping)","Validate the case-sensitive name mapping configuration/file syntax before restarting Presto","Ensure the mapping file is readable by the Presto process on all nodes","Temporarily set case-sensitive-name-matching=false if mapping is not needed"],"exampleFix":"// before (mapping pattern invalid)\ncase-sensitive-name-matching=true\n// after: correct the mapping entry so resolution does not throw\n// mapping file entry: ^MySchema$ -> MYSCHEMA  (valid regex, readable file)","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    SchemaTableName remote = resolveRemoteSchema(schemaName);\n} catch (PrestoException e) {\n    if (\"Failed to find remote schema name\".contains(e.getMessage().split(\":\")[0])) {\n        // inspect the wrapped cause; fix the mapping config\n        log.error(\"Name mapping failure: {}\", e.getCause(), e);\n    } else throw e;\n}","preventionTips":["Test regex patterns in the case-sensitive name mapping against real schema names before deploying","Keep mapping files readable and identical on every Presto node","Validate mapping config at deploy time with a dry-run resolution script"],"tags":["jdbc","name-mapping","configuration","schema"],"backgroundTag":"remote-name-resolution-failed","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"}