{"record":{"id":"2a9e77cf204881bf","repo":"pentaho/pentaho-kettle","slug":"unable-to-save-step-information-to-the-repository-for-id-2a9e77","errorCode":null,"errorMessage":"Unable to save step information to the repository for id_step=","messagePattern":"Unable to save step information to the repository for id_step=","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/setvaluefield/SetValueFieldMeta.java","lineNumber":179,"sourceCode":"\n      for ( int i = 0; i < nrfields; i++ ) {\n        fieldName[i] = rep.getStepAttributeString( id_step, i, \"field_name\" );\n        replaceByFieldValue[i] = rep.getStepAttributeString( id_step, i, \"replace_by\" );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"SetValueFieldMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository\" ), e );\n    }\n  }\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 < fieldName.length; i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_name\", fieldName[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"replace_by\", replaceByFieldValue[i] );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"SetValueFieldMeta.Exception.UnableToSaveStepInfoToRepository\" )\n        + id_step, e );\n    }\n\n  }\n\n  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,\n    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,\n    Repository repository, IMetaStore metaStore ) {\n    CheckResult cr;\n    if ( prev == null || prev.size() == 0 ) {\n      cr =\n        new CheckResult( CheckResult.TYPE_RESULT_WARNING, BaseMessages.getString(\n          PKG, \"SetValueFieldMeta.CheckResult.NoReceivingFieldsError\" ), stepMeta );\n    } else {\n      cr =\n        new CheckResult( CheckResult.TYPE_RESULT_OK, BaseMessages.getString(\n          PKG, \"SetValueFieldMeta.CheckResult.StepReceivingFieldsOK\", prev.size() + \"\" ), stepMeta );","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/setvaluefield/SetValueFieldMeta.java#L161-L197","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check the chained cause in the stack trace for the underlying SQL/connection error.","Confirm the repository user has write (INSERT/UPDATE/DELETE) permission on the step attribute tables.","Reconnect to the repository (close/reopen in Spoon) and retry saving.","If attributes are too long or invalid, shorten field names / remove blank mapping rows, then save again."],"exampleFix":"// before: read-only user\nrepo.connect(\"report_viewer\", pwd);\n// after\nrepo.connect(\"etl_admin\", pwd); // user with write grants on repository tables","handlingStrategy":"try-catch","validationCode":"// Ensure repository is writable before save\nif (repository.isReadOnly()) {\n  throw new IllegalStateException(\"Repository opened read-only; save will fail\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  transMeta.saveRep(repo, metaStore, transId, null);\n} catch (KettleException e) {\n  log.error(\"Repository save failed for step {}: {} cause={}\", e.getMessage(), e.getCause());\n}","preventionTips":["Grant the repository user write access to R_STEP_ATTRIBUTE and related tables","Avoid opening the repository in read-only mode when edits are expected","Watch for connection pool timeouts on large transformations","Keep field names within column size limits"],"tags":["kettle","repository","database-write","metadata"],"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"}