{"record":{"id":"e42e7b5f9b2d4db6","repo":"pentaho/pentaho-kettle","slug":"stringoperationsmeta-exception-unabletosavestepinfo","errorCode":null,"errorMessage":"StringOperationsMeta.Exception.UnableToSaveStepInfo","messagePattern":"StringOperationsMeta\\.Exception\\.UnableToSaveStepInfo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/stringoperations/StringOperationsMeta.java","lineNumber":516,"sourceCode":"  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {\n    try {\n\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, \"trim_type\", trimType[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"lower_upper\", lowerUpper[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"padding_type\", padding_type[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"pad_char\", padChar[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"pad_len\", padLen[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"init_cap\", initCap[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"mask_xml\", maskXML[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"digits\", digits[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"remove_special_characters\", remove_special_characters[i] );\n\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"StringOperationsMeta.Exception.UnableToSaveStepInfo\" )\n        + id_step, e );\n    }\n  }\n\n  @Override\n  public void getFields( Bowl bowl, RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info,\n    StepMeta nextStep, VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {\n    // Add new field?\n    for ( int i = 0; i < fieldOutStream.length; i++ ) {\n      ValueMetaInterface v;\n      String outputField = space.environmentSubstitute( fieldOutStream[i] );\n      if ( !Utils.isEmpty( outputField ) ) {\n        // Add a new field\n        v = new ValueMetaString( outputField );\n        v.setLength( 100, -1 );\n        v.setOrigin( name );\n        inputRowMeta.addValueMeta( v );","sourceCodeStart":498,"sourceCodeEnd":534,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/stringoperations/StringOperationsMeta.java#L498-L534","documentation":"KettleException thrown by StringOperationsMeta.saveRep when saving the String Operations step's configuration to a Pentaho repository fails. saveRep writes per-row attributes (mask_xml, digits, remove_special_characters, etc.) via rep.saveStepAttribute; any exception in that block is wrapped with this localized message plus the step id and rethrown. The step ObjectId is appended to the message to help locate the failing step.","triggerScenarios":"Calling saveRep (transformation save) when the repository write fails: connection loss mid-save, database constraint violation, insufficient write permissions, or a null/oversized attribute value passed to saveStepAttribute.","commonSituations":"Saving a transformation to a read-only repository or without edit rights; DBA-enforced column size limits truncating long mask XML; intermittent database connectivity during save; concurrent edits locking repository rows.","solutions":["Check the chained cause exception to identify the underlying repository/database failure.","Verify the repository account has write permission on the transformation folder.","Test repository connectivity and retry the save after restoring the connection.","Shorten or sanitize step attribute values (e.g., large mask XML) if the repository column limits are being hit."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// before save: ensure repository is writable\nif ( !repository.getSecurityProvider().hasAccess( ..., PermissionType.MODIFY ) ) throw ...","typeGuard":null,"tryCatchPattern":"try { meta.saveRep( rep, metaStore, idTrans, idStep ); } catch ( KettleException e ) { log.error( \"saveRep failed for step \" + idStep + \": \" + e.getCause(), e ); throw e; }","preventionTips":["Save with an account that has modify rights.","Avoid oversized/odd attribute values.","Retry saves after transient DB failures.","Watch repository storage quotas/column limits."],"tags":["kettle","repository","metadata-save","pdi"],"backgroundTag":"file-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"}