pentaho/pentaho-kettle · error · KettleException

AggregateRowsMeta.Exception.UnableToSaveStepInfo

AggregateRowsMeta.Exception.UnableToSaveStepInfo

Error message

AggregateRowsMeta.Exception.UnableToSaveStepInfo

What it means

AggregateRowsMeta.saveRep persists the step's fields to a repository and throws KettleException with this localized message (plus the step id appended) when a saveStepAttribute call fails. It means the step's metadata could not be written to the repository.

Solutions

  1. Check repository connectivity and that the database is writable; retry the save.
  2. Reopen the transformation fresh from the repository to get valid ids, then re-save.
  3. Inspect the wrapped cause for the underlying SQL error (constraints, lock timeouts).
  4. Verify the repository schema is migrated to the current PDI version.

Example fix

// before
stepMeta.saveMeta(rep, transMeta); // fails silently upstream, KettleException here
// after
try {
  stepMeta.saveMeta(rep, transMeta);
} catch (KettleException e) {
  // reload transformation to refresh id_step, ensure repo writable, then retry
  throw new KettleException("Save failed for step " + e.getMessage() + "; refresh and retry", e);
}
Defensive patterns

Strategy: retry

Validate before calling

// Ensure ids are fresh before saving
if (id_step <= 0) throw new IllegalStateException("Stale step id; reload transformation from repository first");

Try / catch

try {
  meta.saveRep(rep, ...);
} catch (KettleException e) {
  logger.error("Repository write failed: " + e.getCause(), e);
  // reload transformation to refresh ids and confirm repo is writable, then retry
}

Prevention

When it happens

Trigger: saveRep is called while the repository connection is broken, the transaction is in a bad state, a saveStepAttribute throws KettleException due to a database constraint, or the transformation/step ids are stale (step deleted concurrently).

Common situations: Repository database down or read-only during save; saving after another user deleted the transformation; repository schema version mismatch after upgrade; network drop mid-save.

Related errors


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

Appendix: source

Thrown at plugins/aggregate-rows/core/src/main/java/org/pentaho/di/trans/steps/aggregaterows/AggregateRowsMeta.java:300

        aggregateType[i] = getType( rep.getStepAttributeString( id_step, i, "field_type" ) );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "AggregateRowsMeta.Exception.UnexpectedErrorWhileReadingStepInfo" ), e );
    }

  }

  @Override
  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {
      for ( int i = 0; i < fieldName.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "field_name", fieldName[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_rename", fieldNewName[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_type", getTypeDesc( aggregateType[i] ) );
      }
    } catch ( KettleException e ) {
      throw new KettleException( BaseMessages.getString( PKG, "AggregateRowsMeta.Exception.UnableToSaveStepInfo" )
        + id_step, e );
    }
  }

  @Override
  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
    Repository repository, IMetaStore metaStore ) {

    CheckResult cr;
    String message = "";

    if ( fieldName.length > 0 ) {
      boolean error_found = false;
      // See if all fields are available in the input stream...
      message =
        BaseMessages.getString( PKG, "AggregateRowsMeta.CheckResult.FieldsNotFound.DialogMessage" ) + Const.CR;
      for ( int i = 0; i < fieldName.length; i++ ) {

View on GitHub (pinned to f3058517a1)