{"record":{"id":"47b232824ceab059","repo":"pentaho/pentaho-kettle","slug":"filelockedmeta-exception-unexpectederrorreadingstepinfo","errorCode":"FileLockedMeta.Exception.UnexpectedErrorReadingStepInfo","errorMessage":"FileLockedMeta.Exception.UnexpectedErrorReadingStepInfo","messagePattern":"FileLockedMeta\\.Exception\\.UnexpectedErrorReadingStepInfo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/filelocked/FileLockedMeta.java","lineNumber":157,"sourceCode":"\n  private void readData( Node stepnode, List<DatabaseMeta> databases ) throws KettleXMLException {\n    try {\n      filenamefield = XMLHandler.getTagValue( stepnode, \"filenamefield\" );\n      resultfieldname = XMLHandler.getTagValue( stepnode, \"resultfieldname\" );\n      addresultfilenames = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"addresultfilenames\" ) );\n    } catch ( Exception e ) {\n      throw new KettleXMLException(\n        BaseMessages.getString( PKG, \"FileLockedMeta.Exception.UnableToReadStepInfo\" ), e );\n    }\n  }\n\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 ) {","sourceCodeStart":139,"sourceCodeEnd":175,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/filelocked/FileLockedMeta.java#L139-L175","documentation":"readRep loads the FileLocked step's settings from a Pentaho repository (getStepAttributeString/Boolean for filenamefield, resultfieldname, addresultfilenames). Any repository access failure is wrapped in a KettleException with this message, meaning the step definition could not be read from the database-backed repository.","triggerScenarios":"readRep(): rep.getStepAttributeString/getStepAttributeBoolean throws - repository DB unreachable, R_STEP_ATTRIBUTE table missing/corrupt, or invalid id_step.","commonSituations":"Repository database down or migrated; schema version mismatch after a Pentaho upgrade; broken repository connection settings; manually deleted repository rows.","solutions":["Check repository connectivity (test the repository connection in Spoon) and that the database is running.","Verify the repository schema is up to date for your Pentaho version (run the upgrade scripts).","Re-save or recreate the step if its repository rows are corrupted; fall back to loading the transformation from a .ktr file."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Test repository connectivity before loading:\nRepository rep = KettleDatabaseRepository.findRepository(...);\nif (!rep.connect(\"user\", \"pass\")) throw new IllegalStateException(\"Repository unavailable\");","typeGuard":null,"tryCatchPattern":"try {\n  transMeta.readRep(rep, metaStore, id_step, databases);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"UnexpectedErrorReadingStepInfo\")) {\n    log.error(\"Repository read failed for step \" + id_step + \" - check DB connectivity/schema\", e);\n  }\n  throw e;\n}","preventionTips":["Keep the repository schema upgraded to match your Pentaho version.","Monitor repository DB health before batch transformation loads.","Maintain file-based (.ktr) copies as fallback for repository-stored transformations."],"tags":["kettle","repository","database"],"backgroundTag":"database-query-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"}