{"record":{"id":"18ea202d171fc59d","repo":"pentaho/pentaho-kettle","slug":"replacestringmeta-exception-unabletosavestepinfo","errorCode":null,"errorMessage":"ReplaceStringMeta.Exception.UnableToSaveStepInfo","messagePattern":"ReplaceStringMeta\\.Exception\\.UnableToSaveStepInfo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/replacestring/ReplaceStringMeta.java","lineNumber":355,"sourceCode":"  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {\n    try {\n      for ( int i = 0; i < fieldInStream.length; i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, \"in_stream_name\", fieldInStream[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"out_stream_name\", fieldOutStream[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"use_regex\", useRegEx[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"replace_string\", replaceString[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"replace_by_string\", replaceByString[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"set_empty_string\", setEmptyString[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"replace_field_by_string\", replaceFieldByString[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"whole_world\", wholeWord[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"case_sensitive\", caseSensitive[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"is_unicode\", isUnicode[i] );\n\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"ReplaceStringMeta.Exception.UnableToSaveStepInfo\" )\n        + id_step, e );\n    }\n  }\n\n  @Override\n  public void getFields( Bowl bowl, RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,\n    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {\n    int nrFields = fieldInStream == null ? 0 : fieldInStream.length;\n    for ( int i = 0; i < nrFields; i++ ) {\n      String fieldName = space.environmentSubstitute( fieldOutStream[i] );\n      ValueMetaInterface valueMeta;\n      if ( !Utils.isEmpty( fieldOutStream[i] ) ) {\n        // We have a new field\n        valueMeta = new ValueMetaString( fieldName );\n        valueMeta.setOrigin( name );\n        //set encoding to new field from source field http://jira.pentaho.com/browse/PDI-11839\n        ValueMetaInterface sourceField = inputRowMeta.searchValueMeta( fieldInStream[i] );\n        if ( sourceField != null ) {","sourceCodeStart":337,"sourceCodeEnd":373,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/replacestring/ReplaceStringMeta.java#L337-L373","documentation":"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.","triggerScenarios":"Saving a transformation containing a ReplaceString step to a repository when a saveStepAttribute call throws: connection failure, insufficient privileges, database constraints/read-only state.","commonSituations":"Database read-only or out of space; user lacks write grants; connection dropped mid-save; very large transformations exceeding DB limits.","solutions":["Check repository connectivity and retry the save.","Confirm the repository user has write privileges on the step attribute tables.","Check database disk space / read-only mode.","Inspect the chained cause for the specific SQL error."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Java: check connectivity and write access before saving\nif ( !repository.isConnected() ) {\n  repository.connect( user, password );\n}","typeGuard":null,"tryCatchPattern":"try {\n  transMeta.save( repository, dir, monitor );\n} catch ( KettleException e ) {\n  log.error( \"Repository save failed, will retry: \" + e.getCause(), e );\n  // retry with backoff for transient connection issues\n}","preventionTips":["Use retry with backoff on repository saves.","Grant DB write privileges to the Pentaho user.","Watch for disk-space/read-only conditions on the repository DB."],"tags":["repository","persistence","save"],"backgroundTag":"database-write-failed","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}