{"record":{"id":"b897cdea6f0455d5","repo":"pentaho/pentaho-kettle","slug":"unable-to-save-step-information-to-the-repository-for-id-b897cd","errorCode":null,"errorMessage":"Unable to save step information to the repository for id_step= + id_step","messagePattern":"Unable to save step information to the repository for id_step= \\+ id_step","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/symmetriccrypto/secretkeygenerator/SecretKeyGeneratorMeta.java","lineNumber":361,"sourceCode":"      throw new KettleException( \"Unexpected error reading step information from the repository\", e );\n    }\n  }\n\n  @Override\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {\n    try {\n      for ( int i = 0; i < algorithm.length; i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, \"algorithm\", algorithm[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"scheme\", scheme[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"secretKeyLen\", secretKeyLength[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"secretKeyCount\", secretKeyCount[i] );\n      }\n      rep.saveStepAttribute( id_transformation, id_step, \"secretKeyFieldName\", secretKeyFieldName );\n      rep.saveStepAttribute( id_transformation, id_step, \"secretKeyLengthFieldName\", secretKeyLengthFieldName );\n      rep.saveStepAttribute( id_transformation, id_step, \"algorithmFieldName\", algorithmFieldName );\n      rep.saveStepAttribute( id_transformation, id_step, \"outputKeyInBinary\", outputKeyInBinary );\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unable to save step information to the repository for id_step=\" + id_step, e );\n    }\n\n  }\n\n  @Override\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    // See if we have input streams leading to this step!\n    int nrRemarks = remarks.size();\n    for ( int i = 0; i < algorithm.length; i++ ) {\n      int len = Const.toInt( transMeta.environmentSubstitute( getSecretKeyLength()[i] ), -1 );\n      if ( len < 0 ) {\n        CheckResult cr =\n          new CheckResult( CheckResult.TYPE_RESULT_ERROR, BaseMessages.getString(\n            PKG, \"SecretKeyGeneratorMeta.CheckResult.WrongLen\", String.valueOf( i ) ), stepMeta );\n        remarks.add( cr );\n      }","sourceCodeStart":343,"sourceCodeEnd":379,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/symmetriccrypto/secretkeygenerator/SecretKeyGeneratorMeta.java#L343-L379","documentation":"SecretKeyGeneratorMeta.saveRep throws KettleException with this message when saving the step's attributes to the repository fails via rep.saveStepAttribute calls. The id_step is included in the message for locating the failing row.","triggerScenarios":"Calling saveRep(Repository, IMetaStore, ObjectId id_transformation, ObjectId id_step) when the repository connection drops, id_step is invalid, a constraint is violated, or the repository DB is read-only/full.","commonSituations":"Saving a transformation to a database repository with a stale connection; DB disk quota exceeded; permission revoked mid-session; saving to a repository created by an incompatible Kettle schema version.","solutions":["Check the wrapped cause for the JDBC error and fix connectivity/permissions","Reconnect to the repository and retry the save","Verify the R_STEP_ATTRIBUTE table is writable and not full (quota/disk)","Verify repository schema is up to date for your Pentaho version"],"exampleFix":"// before: saving on a possibly stale connection\nrep.saveStepAttribute(id_transformation, id_step, \"secretKeyFieldName\", secretKeyFieldName);\n// after: ensure connection is alive first\nrep.connect(\"user\", \"pass\");\nrep.saveStepAttribute(id_transformation, id_step, \"secretKeyFieldName\", secretKeyFieldName);","handlingStrategy":"try-catch","validationCode":"// before saveRep\nif (id_step == null) throw new KettleException(\"id_step required before saving step attributes\");","typeGuard":null,"tryCatchPattern":"try { meta.saveRep(rep, metaStore, id_transformation, id_step); } catch (KettleException e) { log.error(\"Save failed for step \" + id_step + \": \" + e.getCause(), e); }","preventionTips":["Reconnect/retry on stale repository connections","Monitor DB quota and write permissions on R_STEP_ATTRIBUTE","Save frequently to avoid losing work on connection drops"],"tags":["repository","database-write","kettle","step-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"}