prestodb/presto · error · PrestoException
NOT_FOUND
NOT_FOUND
Error message
%s is empty
What it means
SchemaUtil.checkNotEmpty is an internal guard used by SPI implementations to reject empty string parameters. It throws PrestoException(NOT_FOUND, "<name> is empty") when the value is an empty string (null produces a plain NullPointerException instead).
Source
Thrown at presto-spi/src/main/java/com/facebook/presto/spi/SchemaUtil.java:31
*/
package com.facebook.presto.spi;
import static com.facebook.presto.spi.StandardErrorCode.NOT_FOUND;
import static java.lang.String.format;
final class SchemaUtil
{
private SchemaUtil()
{
}
static String checkNotEmpty(String value, String name)
{
if (value == null) {
throw new NullPointerException(name + " is null");
}
if (value.isEmpty()) {
throw new PrestoException(NOT_FOUND, format("%s is empty", name));
}
return value;
}
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Provide a non-empty value for the named parameter in your query/config
- Check connector configuration properties for empty-string values and set proper defaults
- Wrap calls and catch PrestoException with code NOT_FOUND to surface a clearer message to the user
Example fix
// before
connector.getSchemaNames("");
// after
connector.getSchemaNames("default"); Defensive patterns
Strategy: validation
Validate before calling
if (value == null || value.isEmpty()) throw new IllegalArgumentException(name + " must be non-empty");
Try / catch
try { ... } catch (PrestoException e) { if (e.getErrorCode().getCode() == StandardErrorCode.NOT_FOUND.toErrorCodeCode()) { /* handle empty identifier */ } throw e; } Prevention
- Validate config properties with @NotEmpty or explicit checks at connector startup
- Never pass user input straight into schema/source identifiers without trimming and emptiness checks
When it happens
Trigger: Any SPI method whose implementation calls SchemaUtil.checkNotEmpty (e.g. schema/source/catalog name validation) with an empty string argument, such as getSchemaNames/getTableHandle receiving schema="".
Common situations: Missing configuration property leaving a schema or source name as empty string; user-supplied identifier that was trimmed to nothing; connector config like a hive schema property set to "".
Understand the failure class
Background: NOT_FOUND error code: why tRPC, Harbor, Nacos and other libraries return 404 "not found" errors for resources that may still exist — this error's family across 11 libraries.
Related errors
- NO_NODES_AVAILABLE
- HIVE_RANGER_SERVER_ERROR
- HIVE_RANGER_SERVER_ERROR
- HIVE_CORRUPTED_COLUMN_STATISTICS
- errorDetail.errorMessage()
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/4488a11b46bc97a2.
Report an issue: GitHub.