pentaho/pentaho-kettle · error · KettleException

ExecSQLRowMeta.Exception.UnexpectedErrorReadingStepInfo

Error message

ExecSQLRowMeta.Exception.UnexpectedErrorReadingStepInfo

What it means

KettleException thrown by ExecSQLRowMeta.readRep() when an unexpected Exception occurs while reading the step's attributes (connection, read_field, sqlFromfile, sendOneStatement) from the repository. It wraps the repository exception as a catch-all so the step's metadata cannot be loaded.

Solutions

  1. Inspect getCause() for the underlying repository/JDBC error.
  2. Verify repository connectivity and schema version matches the Pentaho release.
  3. Re-save the step in Spoon to regenerate its repository attributes.
  4. Restore missing rows in the repository step-attribute tables from backup.

Example fix

// before
TransMeta tm = new TransMeta(rep, "MyTrans", dir);
// after
try {
  TransMeta tm = new TransMeta(rep, "MyTrans", dir);
} catch (KettleException e) {
  log.error("root cause: ", e.getCause());
}
Defensive patterns

Strategy: try-catch

Validate before calling

if (!rep.isConnected()) throw new IllegalStateException("repository not connected");

Try / catch

try { meta.readRep(rep, metaStore, id_step, null); } catch (KettleException e) { log.error("repository read failed: " + e.getCause(), e); }

Prevention

When it happens

Trigger: Any rep.getStepAttributeString/getStepAttributeBoolean/insertStepDatabase-related call inside readRep() throws — corrupt repository rows, missing id_step, or JDBC failure while loading the transformation.

Common situations: Repository schema mismatch after upgrade; step attributes partially deleted; transient DB connectivity failure during transformation load.

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/6e1bd4a797ff1052. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/execsqlrow/ExecSQLRowMeta.java:325

      databaseMeta = rep.loadDatabaseMetaFromStepAttribute( id_step, "id_connection", databases );
      commitSize = (int) rep.getStepAttributeInteger( id_step, "commit" );
      sqlField = rep.getStepAttributeString( id_step, "sql_field" );

      insertField = rep.getStepAttributeString( id_step, "insert_field" );
      updateField = rep.getStepAttributeString( id_step, "update_field" );
      deleteField = rep.getStepAttributeString( id_step, "delete_field" );
      readField = rep.getStepAttributeString( id_step, "read_field" );
      sqlFromfile = rep.getStepAttributeBoolean( id_step, "sqlFromfile" );

      String sendOneStatementString = rep.getStepAttributeString( id_step, "sendOneStatement" );
      if ( Utils.isEmpty( sendOneStatementString ) ) {
        sendOneStatement = true;
      } else {
        sendOneStatement = rep.getStepAttributeBoolean( id_step, "sendOneStatement" );
      }

    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "ExecSQLRowMeta.Exception.UnexpectedErrorReadingStepInfo" ), e );
    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {
      rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, "id_connection", databaseMeta );
      rep.saveStepAttribute( id_transformation, id_step, "commit", commitSize );
      rep.saveStepAttribute( id_transformation, id_step, "sql_field", sqlField );

      rep.saveStepAttribute( id_transformation, id_step, "insert_field", insertField );
      rep.saveStepAttribute( id_transformation, id_step, "update_field", updateField );
      rep.saveStepAttribute( id_transformation, id_step, "delete_field", deleteField );
      rep.saveStepAttribute( id_transformation, id_step, "read_field", readField );

      // Also, save the step-database relationship!
      if ( databaseMeta != null ) {
        rep.insertStepDatabase( id_transformation, id_step, databaseMeta.getObjectId() );

View on GitHub (pinned to f3058517a1)