prestodb/presto · error · SQLException
No wrapper for
Error message
No wrapper for
What it means
unwrap in PrestoStatement returns this when iface.isInstance(this) holds; otherwise this SQLException is thrown. It is the standard JDBC wrapper guard: it fires when the caller requests an interface (e.g. a vendor extension or optional JDBC feature) that PrestoStatement does not implement.
Source
Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoStatement.java:612
}
@Override
public boolean isCloseOnCompletion()
throws SQLException
{
checkOpen();
return closeOnCompletion.get();
}
@SuppressWarnings("unchecked")
@Override
public <T> T unwrap(Class<T> iface)
throws SQLException
{
if (isWrapperFor(iface)) {
return (T) this;
}
throw new SQLException("No wrapper for " + iface);
}
@Override
public boolean isWrapperFor(Class<?> iface)
throws SQLException
{
return iface.isInstance(this);
}
public String getUpdateType()
throws SQLException
{
checkOpen();
return currentUpdateType.get();
}
public void partialCancel()
throws SQLExceptionView on GitHub (pinned to 55bb57d202)
Solutions
- Check isWrapperFor(iface) before calling unwrap
- Only request interfaces actually implemented by PrestoStatement
- Catch SQLException around unwrap when probing optional JDBC interfaces
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoStatement.java:612 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/5fe83c55f8aa943e.
Report an issue: GitHub.