{"record":{"id":"f782f73cb808c5e7","repo":"pentaho/pentaho-kettle","slug":"error-determining-value-metadata-from-sql-resultset-metadata","errorCode":null,"errorMessage":"Error determining value metadata from SQL resultset metadata","messagePattern":"Error determining value metadata from SQL resultset metadata","errorType":"exception","errorClass":"KettleDatabaseException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/row/value/ValueMetaBase.java","lineNumber":4979,"sourceCode":"        //\n        try {\n          ValueMetaInterface storageMetaData = ValueMetaFactory.cloneValueMeta( v, ValueMetaInterface.TYPE_STRING );\n          storageMetaData.setStorageType( ValueMetaInterface.STORAGE_TYPE_NORMAL );\n          v.setStorageMetadata( storageMetaData );\n        } catch ( Exception e ) {\n          throw new SQLException( e );\n        }\n      }\n\n      ValueMetaInterface newV = null;\n      try {\n        newV = databaseMeta.getDatabaseInterface().customizeValueFromSQLType( v, rm, index );\n      } catch ( SQLException e ) {\n        throw new SQLException( e );\n      }\n      return newV == null ? v : newV;\n    } catch ( Exception e ) {\n      throw new KettleDatabaseException( \"Error determining value metadata from SQL resultset metadata\", e );\n    }\n  }\n\n  protected void getOriginalColumnMetadata( ValueMetaInterface v, ResultSetMetaData rm, int index, boolean ignoreLength )\n    throws SQLException {\n    // Grab the comment as a description to the field as well.\n    String comments = rm.getColumnLabel( index );\n    v.setComments( comments );\n\n    // get & store more result set meta data for later use\n    int originalColumnType = rm.getColumnType( index );\n    v.setOriginalColumnType( originalColumnType );\n\n    String originalColumnTypeName = rm.getColumnTypeName( index );\n    v.setOriginalColumnTypeName( originalColumnTypeName );\n\n    int originalPrecision = -1;\n    if ( !ignoreLength ) {","sourceCodeStart":4961,"sourceCodeEnd":4997,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/row/value/ValueMetaBase.java#L4961-L4997","documentation":"Wrapper error while deriving a ValueMeta from a JDBC ResultSet's metadata in getSqlType(): either cloning the storage metadata or the database-specific customizeValueFromSQLType() customization threw, and it was rethrown as a plain SQLException with this message and the original cause.","triggerScenarios":"Thrown at core/src/main/java/org/pentaho/di/core/row/value/ValueMetaBase.java:4979 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the chained cause for the real failure (unsupported SQL type, driver quirk)","Update or replace the JDBC driver if its resultset metadata is non-standard","Simplify the query/column types that trigger the database-specific customization"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}