pentaho/pentaho-kettle · error · KettleException

Unable to save step information to the repository for…

Error message

Unable to save step information to the repository for id_step=

What it means

SetValueFieldMeta.saveRep wraps failures while persisting the step's field_name/replace_by attributes via rep.saveStepAttribute into a KettleException with this message plus the id_step. It indicates the step metadata could not be written to the repository, so saving the transformation will fail.

Solutions

  1. Check the chained cause in the stack trace for the underlying SQL/connection error.
  2. Confirm the repository user has write (INSERT/UPDATE/DELETE) permission on the step attribute tables.
  3. Reconnect to the repository (close/reopen in Spoon) and retry saving.
  4. If attributes are too long or invalid, shorten field names / remove blank mapping rows, then save again.

Example fix

// before: read-only user
repo.connect("report_viewer", pwd);
// after
repo.connect("etl_admin", pwd); // user with write grants on repository tables
Defensive patterns

Strategy: try-catch

Validate before calling

// Ensure repository is writable before save
if (repository.isReadOnly()) {
  throw new IllegalStateException("Repository opened read-only; save will fail");
}

Try / catch

try {
  transMeta.saveRep(repo, metaStore, transId, null);
} catch (KettleException e) {
  log.error("Repository save failed for step {}: {} cause={}", e.getMessage(), e.getCause());
}

Prevention

When it happens

Trigger: saveRep iterates fieldName and calls rep.saveStepAttribute(id_transformation, id_step, i, ...); a repository connection loss, DB constraint violation, read-only repository user, or oversized attribute value causes the exception, which is rethrown as KettleException with id_step appended.

Common situations: Repository database went away or hit connection timeout during save; the repository user lacks INSERT/UPDATE rights on R_STEP_ATTRIBUTE; the repository is opened read-only; very long field names exceeding column width.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/setvaluefield/SetValueFieldMeta.java:179

      for ( int i = 0; i < nrfields; i++ ) {
        fieldName[i] = rep.getStepAttributeString( id_step, i, "field_name" );
        replaceByFieldValue[i] = rep.getStepAttributeString( id_step, i, "replace_by" );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "SetValueFieldMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository" ), e );
    }
  }

  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, "replace_by", replaceByFieldValue[i] );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "SetValueFieldMeta.Exception.UnableToSaveStepInfoToRepository" )
        + id_step, e );
    }

  }

  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;
    if ( prev == null || prev.size() == 0 ) {
      cr =
        new CheckResult( CheckResult.TYPE_RESULT_WARNING, BaseMessages.getString(
          PKG, "SetValueFieldMeta.CheckResult.NoReceivingFieldsError" ), stepMeta );
    } else {
      cr =
        new CheckResult( CheckResult.TYPE_RESULT_OK, BaseMessages.getString(
          PKG, "SetValueFieldMeta.CheckResult.StepReceivingFieldsOK", prev.size() + "" ), stepMeta );

View on GitHub (pinned to f3058517a1)