pentaho/pentaho-kettle · error · KettleException

ReplaceStringMeta.Exception.UnableToSaveStepInfo

Error message

ReplaceStringMeta.Exception.UnableToSaveStepInfo

What it means

ReplaceStringMeta.saveRep writes each field's step attributes (whole_world, case_sensitive, is_unicode, names, patterns) to the repository; failures are wrapped in KettleException 'ReplaceStringMeta.Exception.UnableToSaveStepInfo' plus the id_step. Persisting the step configuration to the repository failed.

Solutions

  1. Check repository connectivity and retry the save.
  2. Confirm the repository user has write privileges on the step attribute tables.
  3. Check database disk space / read-only mode.
  4. Inspect the chained cause for the specific SQL error.
Defensive patterns

Strategy: retry

Validate before calling

// Java: check connectivity and write access before saving
if ( !repository.isConnected() ) {
  repository.connect( user, password );
}

Try / catch

try {
  transMeta.save( repository, dir, monitor );
} catch ( KettleException e ) {
  log.error( "Repository save failed, will retry: " + e.getCause(), e );
  // retry with backoff for transient connection issues
}

Prevention

When it happens

Trigger: Saving a transformation containing a ReplaceString step to a repository when a saveStepAttribute call throws: connection failure, insufficient privileges, database constraints/read-only state.

Common situations: Database read-only or out of space; user lacks write grants; connection dropped mid-save; very large transformations exceeding DB limits.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/replacestring/ReplaceStringMeta.java:355

  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {
      for ( int i = 0; i < fieldInStream.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "in_stream_name", fieldInStream[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "out_stream_name", fieldOutStream[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "use_regex", useRegEx[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "replace_string", replaceString[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "replace_by_string", replaceByString[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "set_empty_string", setEmptyString[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "replace_field_by_string", replaceFieldByString[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "whole_world", wholeWord[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "case_sensitive", caseSensitive[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "is_unicode", isUnicode[i] );

      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG, "ReplaceStringMeta.Exception.UnableToSaveStepInfo" )
        + id_step, e );
    }
  }

  @Override
  public void getFields( Bowl bowl, RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
    int nrFields = fieldInStream == null ? 0 : fieldInStream.length;
    for ( int i = 0; i < nrFields; i++ ) {
      String fieldName = space.environmentSubstitute( fieldOutStream[i] );
      ValueMetaInterface valueMeta;
      if ( !Utils.isEmpty( fieldOutStream[i] ) ) {
        // We have a new field
        valueMeta = new ValueMetaString( fieldName );
        valueMeta.setOrigin( name );
        //set encoding to new field from source field http://jira.pentaho.com/browse/PDI-11839
        ValueMetaInterface sourceField = inputRowMeta.searchValueMeta( fieldInStream[i] );
        if ( sourceField != null ) {

View on GitHub (pinned to f3058517a1)