{"record":{"id":"31f4ef1f56ae6a43","repo":"pentaho/pentaho-kettle","slug":"filelockedmeta-exception-unabletosavestepinfo","errorCode":"FileLockedMeta.Exception.UnableToSaveStepInfo","errorMessage":"FileLockedMeta.Exception.UnableToSaveStepInfo","messagePattern":"FileLockedMeta\\.Exception\\.UnableToSaveStepInfo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/filelocked/FileLockedMeta.java","lineNumber":168,"sourceCode":"\n  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {\n    try {\n      filenamefield = rep.getStepAttributeString( id_step, \"filenamefield\" );\n      resultfieldname = rep.getStepAttributeString( id_step, \"resultfieldname\" );\n      addresultfilenames = rep.getStepAttributeBoolean( id_step, \"addresultfilenames\" );\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"FileLockedMeta.Exception.UnexpectedErrorReadingStepInfo\" ), e );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {\n    try {\n      rep.saveStepAttribute( id_transformation, id_step, \"filenamefield\", filenamefield );\n      rep.saveStepAttribute( id_transformation, id_step, \"resultfieldname\", resultfieldname );\n      rep.saveStepAttribute( id_transformation, id_step, \"addresultfilenames\", addresultfilenames );\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"FileLockedMeta.Exception.UnableToSaveStepInfo\" )\n        + id_step, e );\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    String error_message = \"\";\n\n    if ( Utils.isEmpty( resultfieldname ) ) {\n      error_message = BaseMessages.getString( PKG, \"FileLockedMeta.CheckResult.ResultFieldMissing\" );\n      cr = new CheckResult( CheckResult.TYPE_RESULT_ERROR, error_message, stepMeta );\n      remarks.add( cr );\n    } else {\n      error_message = BaseMessages.getString( PKG, \"FileLockedMeta.CheckResult.ResultFieldOK\" );\n      cr = new CheckResult( CheckResult.TYPE_RESULT_OK, error_message, stepMeta );\n      remarks.add( cr );","sourceCodeStart":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/filelocked/FileLockedMeta.java#L150-L186","documentation":"saveRep persists the FileLocked step settings (filenamefield, resultfieldname, addresultfilenames) via rep.saveStepAttribute. If any save call throws, the exception is wrapped in a KettleException with this message plus the id_step, indicating the step configuration could not be written to the repository.","triggerScenarios":"saveRep(): rep.saveStepAttribute throws - repository connection lost mid-save, read-only repository user, or repository schema constraints violated.","commonSituations":"Saving a transformation with a read-only repository account; network drop between Spoon and the repository database; repository storage full or schema mismatch after upgrade.","solutions":["Check the repository connection is alive and retry the save.","Ensure the repository user has write privileges on R_STEP_ATTRIBUTE.","Save the transformation locally as a .ktr file instead, then fix the repository and re-import."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Verify write access before saving:\nif (!rep.isConnected()) throw new IllegalStateException(\"Repository not connected\");","typeGuard":null,"tryCatchPattern":"try {\n  stepMeta.getStepMeta().saveRep(rep, metaStore, id_transformation, id_step);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"UnableToSaveStepInfo\")) {\n    log.error(\"Repository save failed for step \" + id_step, e);\n    // fall back to local file save\n  }\n  throw e;\n}","preventionTips":["Save with a repository account that has write permissions.","Save a local .ktr copy before repository commits.","Check repository DB disk space and connection stability for automated saves."],"tags":["kettle","repository","persistence"],"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"}