{"record":{"id":"012110400add0216","repo":"pentaho/pentaho-kettle","slug":"processfilesmeta-exception-unexpectederrorreadingstepinfo","errorCode":null,"errorMessage":"ProcessFilesMeta.Exception.UnexpectedErrorReadingStepInfo","messagePattern":"ProcessFilesMeta\\.Exception\\.UnexpectedErrorReadingStepInfo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/processfiles/ProcessFilesMeta.java","lineNumber":282,"sourceCode":"      }\n    }\n    return 0;\n  }\n\n  @Override\n  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {\n    try {\n      sourcefilenamefield = rep.getStepAttributeString( id_step, \"sourcefilenamefield\" );\n      targetfilenamefield = rep.getStepAttributeString( id_step, \"targetfilenamefield\" );\n      operationType =\n        getOperationTypeByCode( Const.NVL( rep.getStepAttributeString( id_step, \"operation_type\" ), \"\" ) );\n      addresultfilenames = rep.getStepAttributeBoolean( id_step, \"addresultfilenames\" );\n      overwritetargetfile = rep.getStepAttributeBoolean( id_step, \"overwritetargetfile\" );\n      createparentfolder = rep.getStepAttributeBoolean( id_step, \"createparentfolder\" );\n      simulate = rep.getStepAttributeBoolean( id_step, \"simulate\" );\n\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"ProcessFilesMeta.Exception.UnexpectedErrorReadingStepInfo\" ), 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      rep.saveStepAttribute( id_transformation, id_step, \"sourcefilenamefield\", sourcefilenamefield );\n      rep.saveStepAttribute( id_transformation, id_step, \"targetfilenamefield\", targetfilenamefield );\n      rep.saveStepAttribute( id_transformation, id_step, \"operation_type\", getOperationTypeCode( operationType ) );\n      rep.saveStepAttribute( id_transformation, id_step, \"addresultfilenames\", addresultfilenames );\n      rep.saveStepAttribute( id_transformation, id_step, \"overwritetargetfile\", overwritetargetfile );\n      rep.saveStepAttribute( id_transformation, id_step, \"createparentfolder\", createparentfolder );\n      rep.saveStepAttribute( id_transformation, id_step, \"simulate\", simulate );\n\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"ProcessFilesMeta.Exception.UnableToSaveStepInfo\" )\n        + id_step, e );","sourceCodeStart":264,"sourceCodeEnd":300,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/processfiles/ProcessFilesMeta.java#L264-L300","documentation":"Thrown by ProcessFilesMeta.readRep when an exception occurs while reading the step's attributes from the repository (rep.getStepAttribute* calls). It wraps the cause in a KettleException signaling the step info could not be loaded from the repository database.","triggerScenarios":"readRep() throws while fetching any step attribute by id_step; typically repository connection/schema issues or a null/invalid id_step inside the try block.","commonSituations":"Repository database schema out of date (run PDI upgrade scripts); corrupted step rows in R_STEP_ATTRIBUTE; connectivity failure to the repository mid-load; loading a transformation whose step was saved by an incompatible PDI version.","solutions":["Check the wrapped cause of the KettleException to identify the repository error (connection vs. data).","Verify repository connectivity and credentials; retry loading.","Upgrade/repair the repository schema with the PDI database upgrade scripts for your version.","Re-save the step/transformation from a working client, or recreate the ProcessFiles step in the transformation.","Restore affected repository rows from a database backup."],"exampleFix":"// before\nsh spoon.sh  # with old repository schema\n// after\n./pentaho-solutions/administration/.../upgrade_repository.sql applied, then reconnect and load","handlingStrategy":"try-catch","validationCode":"// Check repository connectivity before loading:\nRepository repo = KettleLogStore... // simplified\nboolean connected = repository != null && repository.isConnected();","typeGuard":null,"tryCatchPattern":"try {\n  transMeta.loadFromRepository(rep, id_transformation, null);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"UnexpectedErrorReadingStepInfo\")) {\n    logError(\"Repository read failed for step; cause: \" + e.getCause());\n  } else throw e;\n}","preventionTips":["Keep the repository schema upgraded to match your PDI version","Back up the repository database regularly","Verify repository connection health before batch loads","Recreate corrupt steps rather than patching repository rows manually"],"tags":["pdi","kettle","repository","metadata"],"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"}