{"record":{"id":"d9dda8c916052ded","repo":"prestodb/presto","slug":"no-wrapper-for-d9dda8","errorCode":null,"errorMessage":"No wrapper for ","messagePattern":"No wrapper for ","errorType":"exception","errorClass":"SQLException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java","lineNumber":1640,"sourceCode":"        throw new SQLFeatureNotSupportedException(\"getObject\");\n    }\n\n    @Override\n    public <T> T getObject(String columnLabel, Class<T> type)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"getObject\");\n    }\n\n    @SuppressWarnings(\"unchecked\")\n    @Override\n    public <T> T unwrap(Class<T> iface)\n            throws SQLException\n    {\n        if (isWrapperFor(iface)) {\n            return (T) this;\n        }\n        throw new SQLException(\"No wrapper for \" + iface);\n    }\n\n    @Override\n    public boolean isWrapperFor(Class<?> iface)\n            throws SQLException\n    {\n        return iface.isInstance(this);\n    }\n\n    void partialCancel()\n    {\n        client.cancelLeafStage();\n    }\n\n    private void checkOpen()\n            throws SQLException\n    {\n        if (isClosed()) {","sourceCodeStart":1622,"sourceCodeEnd":1658,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java#L1622-L1658","documentation":"unwrap in PrestoResultSet returns this when isWrapperFor(iface) succeeds (i.e. iface.isInstance(this)); otherwise it throws this SQLException. It fires when application code requests a wrapper interface the PrestoResultSet does not implement — a generic JDBC unwrap guard with the requested class as the faulting input.","triggerScenarios":"Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java:1640 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Only unwrap interfaces the PrestoResultSet actually implements (check isWrapperFor first)","Cast to PrestoResultSet directly only if driver-specific APIs are needed","Catch SQLException around unwrap when probing for optional interfaces"],"exampleFix":null,"handlingStrategy":"try-catch","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"}