pentaho/pentaho-kettle · error · KettleDatabaseException

Error getting row information from database:

Error message

Error getting row information from database: 

What it means

KettleDatabaseException wrapper for a SQLException raised while iterating result set metadata columns to build RowMetaInterface. After successfully obtaining metadata, each column's SQL type is converted via getValueFromSQLType; if any column access fails (SQLException), this error is thrown with the original as cause.

Solutions

  1. Inspect the chained SQLException cause for the real driver error
  2. Update the JDBC driver to a version with correct metadata support
  3. Verify the connection is still open while metadata is read
  4. Log the SQL query and check for unsupported column types (e.g. vendor-specific types)

Example fix

// before
RowMetaInterface meta = db.getRowInfo(rsmd, false, false);
// after
try {
  RowMetaInterface meta = db.getRowInfo(rsmd, false, false);
} catch (KettleDatabaseException e) {
  throw new KettleDatabaseException("Row layout extraction failed for query", e.getCause());
}
Defensive patterns

Strategy: try-catch

Validate before calling

try { rsmd.getColumnCount(); } catch (SQLException e) {
  throw new IllegalStateException("Metadata unreadable: " + e.getMessage());
}

Type guard

null

Try / catch

try {
  meta = db.getRowInfo(rsmd, false, false);
} catch (KettleDatabaseException e) {
  logError("Column metadata read failed: ", e.getCause());
  throw e;
}

Prevention

When it happens

Trigger: During getRowInfo(), rm.getColumnCount() succeeds but a per-column call (getColumnName, getColumnType, getPrecision, etc.) throws SQLException — typically for column index i — while building the row layout.

Common situations: Broken/partial JDBC driver metadata implementations; metadata invalidated by concurrent statement close; exotic column types the driver mis-describes; connection dropped mid-metadata-read.

Understand the failure class

Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/6f44bc0059f0f09f. Report an issue: GitHub.

Appendix: source

Thrown at core/src/main/java/org/pentaho/di/core/database/Database.java:2892

    throws KettleDatabaseException {
    try {
      log.snap( Metrics.METRIC_DATABASE_GET_ROW_META_START, databaseMeta.getName() );

      if ( rm == null ) {
        throw new KettleDatabaseException( "No result set metadata available to retrieve row metadata!" );
      }

      RowMetaInterface rowMeta = new RowMeta();

      try {
        int nrcols = rm.getColumnCount();
        for ( int i = 1; i <= nrcols; i++ ) {
          ValueMetaInterface valueMeta = getValueFromSQLType( rm, i, ignoreLength, lazyConversion );
          rowMeta.addValueMeta( valueMeta );
        }
        return rowMeta;
      } catch ( SQLException ex ) {
        throw new KettleDatabaseException( "Error getting row information from database: ", ex );
      }
    } finally {
      log.snap( Metrics.METRIC_DATABASE_GET_ROW_META_STOP, databaseMeta.getName() );
    }
  }

  private ValueMetaInterface getValueFromSQLType( ResultSetMetaData rm, int i, boolean ignoreLength,
                                                  boolean lazyConversion )
    throws KettleDatabaseException, SQLException {
    // TODO If we do lazy conversion, we need to find out about the encoding
    //

    // Extract the name from the result set meta data...
    //
    String name;
    if ( databaseMeta.isMySQLVariant() ) {
      name = databaseMeta.getDatabaseInterface().getLegacyColumnName( getDatabaseMetaData(), rm, i );
    } else {

View on GitHub (pinned to f3058517a1)