{"record":{"id":"3f7a659fe441210f","repo":"pentaho/pentaho-kettle","slug":"loadfileinput-log-requirednotaccessiblefilesmissing","errorCode":"LoadFileInput.Log.RequiredNotAccessibleFilesMissing","errorMessage":"LoadFileInput.Log.RequiredNotAccessibleFilesMissing","messagePattern":"LoadFileInput\\.Log\\.RequiredNotAccessibleFilesMissing","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/loadfileinput/LoadFileInput.java","lineNumber":300,"sourceCode":"  }\n\n  private void handleMissingFiles() throws KettleException {\n    List<FileObject> nonExistantFiles = data.files.getNonExistantFiles();\n\n    if ( !nonExistantFiles.isEmpty() ) {\n      String message = FileInputList.getRequiredFilesDescription( nonExistantFiles );\n      logError( BaseMessages.getString( PKG, \"LoadFileInput.Log.RequiredFilesTitle\" ), BaseMessages.getString(\n        PKG, \"LoadFileInput.Log.RequiredFiles\", message ) );\n\n      throw new KettleException( BaseMessages.getString( PKG, \"LoadFileInput.Log.RequiredFilesMissing\", message ) );\n    }\n\n    List<FileObject> nonAccessibleFiles = data.files.getNonAccessibleFiles();\n    if ( !nonAccessibleFiles.isEmpty() ) {\n      String message = FileInputList.getRequiredFilesDescription( nonAccessibleFiles );\n      logError( BaseMessages.getString( PKG, \"LoadFileInput.Log.RequiredFilesTitle\" ), BaseMessages.getString(\n        PKG, \"LoadFileInput.Log.RequiredNotAccessibleFiles\", message ) );\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"LoadFileInput.Log.RequiredNotAccessibleFilesMissing\", message ) );\n    }\n  }\n\n  /**\n   * Build an empty row based on the meta-data...\n   *\n   * @return\n   */\n\n  private Object[] buildEmptyRow() {\n    return RowDataUtil.allocateRowData( data.outputRowMeta.size() );\n  }\n\n  Object[] getOneRow() throws KettleException {\n    if ( !openNextFile() ) {\n      return null;\n    }","sourceCodeStart":282,"sourceCodeEnd":318,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/loadfileinput/LoadFileInput.java#L282-L318","documentation":"LoadFileInput (Text File Input variant that loads whole files) validates at step initialization that all files marked as 'required' are accessible. In handleMissingFiles, any files returned by FileInputList.getNonAccessibleFiles() cause logError output plus this KettleException, aborting the transformation init. The library throws it because a file declared required is missing or unreadable, so the step cannot proceed reliably.","triggerScenarios":"Step init() calls handleMissingFiles after building data.files; getNonAccessibleFiles() is non-empty when a filename/mask resolved to a file that does not exist, or exists but is not readable, while the 'Required' column for that file was set to 'Y' (FileExists/FileIsHidden-style required flags).","commonSituations":"Typo'd or hardcoded absolute paths in the file list; files moved/deleted between design time and runtime; running under a service account lacking read permission; wildcards matching nothing but the entry marked required; relative paths resolved against a different working directory on a cluster.","solutions":["Verify the file(s) listed exist and are readable by the user running Kettle; fix path or permissions.","If the file is genuinely optional, set the 'Required?' flag to 'N' for that file entry in the step dialog (fileRequired in meta).","Replace static paths with parameters/variables and validate existence before execution (e.g. a 'Check if file exists' or ETL Metadata Injection pre-step).","Check the agent/server working directory; use fully qualified paths or ${Internal.Transformation.Filename.Directory} based paths."],"exampleFix":"// before\nfileName = \"/data/inbound/sales_20260913.txt\"; fileRequired = \"Y\"; // file moved to archive\n// after\nfileName = \"${Internal.Transformation.Filename.Directory}/inbound/sales_20260913.txt\"; fileRequired = \"N\"; // or restore file/permissions","handlingStrategy":"validation","validationCode":"// In the parent transformation before the LoadFileInput step, or via a pre-check:\nFile f = new File(resolvedPath);\nif (!f.exists() || !f.canRead()) {\n  throw new IllegalStateException(\"Required file missing/unreadable: \" + resolvedPath);\n}\n// Or in the step dialog: set 'Required?' = N for optional files","typeGuard":null,"tryCatchPattern":"try {\n  trans.execute(null);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"RequiredNotAccessibleFilesMissing\") || e.getMessage().contains(\"not accessible\")) {\n    log.error(\"Required input file(s) missing or unreadable: check paths/permissions\", e);\n  } else { throw e; }\n}","preventionTips":["Use variables/parameters instead of hardcoded absolute paths.","Set the 'Required?' flag to N for optional file entries.","Pre-check file existence with a 'Check if file exists' style step or script before the transformation.","Run under an account with read access to all input directories."],"tags":["file-io","configuration","kettle","step-init"],"backgroundTag":"file-not-found","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"}