{"record":{"id":"12552f72cfc37fd0","repo":"pentaho/pentaho-kettle","slug":"fileerrorhandlermissingfiles-exception-12552f","errorCode":"FileErrorHandlerMissingFiles.Exception.CouldNotCreateNonAccessibleFile","errorMessage":"FileErrorHandlerMissingFiles.Exception.CouldNotCreateNonAccessibleFile","messagePattern":"FileErrorHandlerMissingFiles\\.Exception\\.CouldNotCreateNonAccessibleFile","errorType":"error_code","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/step/errorhandling/FileErrorHandlerMissingFiles.java","lineNumber":62,"sourceCode":"  public void handleNonExistantFile( FileObject file ) throws KettleException {\n    handleFile( file );\n    try {\n      getWriter( NO_PARTS ).write( THIS_FILE_DOES_NOT_EXIST );\n      getWriter( NO_PARTS ).write( Const.CR );\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"FileErrorHandlerMissingFiles.Exception.CouldNotCreateNonExistantFile\" )\n        + file.getName().getURI(), e );\n    }\n  }\n\n  public void handleNonAccessibleFile( FileObject file ) throws KettleException {\n    handleFile( file );\n    try {\n      getWriter( NO_PARTS ).write( THIS_FILE_WAS_NOT_ACCESSIBLE );\n      getWriter( NO_PARTS ).write( Const.CR );\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"FileErrorHandlerMissingFiles.Exception.CouldNotCreateNonAccessibleFile\" )\n        + file.getName().getURI(), e );\n    }\n  }\n\n}\n","sourceCodeStart":44,"sourceCodeEnd":69,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/step/errorhandling/FileErrorHandlerMissingFiles.java#L44-L69","documentation":"KettleException thrown by FileErrorHandlerMissingFiles.handleNonAccessibleFile() when logging a file that exists but cannot be accessed (opened/read) to the 'non-accessible files' lineage file fails. Mirrors handleNonExistantFile but records THIS_FILE_WAS_NOT_ACCESSIBLE.","triggerScenarios":"handleNonAccessibleFile(file) invoked when an input file can't be opened by the step; then writing the lineage record throws — lineage file creation/write fails (permissions, path invalid, disk full).","commonSituations":"Input files with OS-level permission problems (process user lacks read access) combined with a lineage directory that's also misconfigured; files locked by another process; SELinux/AppArmor restrictions.","solutions":["Check the chained cause to distinguish lineage-write failure from the original access problem","Fix permissions on both the input file (read access) and the lineage directory (write access)","Check for file locks or security policies (SELinux) blocking access","Point lineage files to a local writable directory and re-run"],"exampleFix":"// before: no read permission on input\nchmod check: -rw------- data.csv, kettle runs as other user\n// after\nchmod 644 data.csv; and ensure lineage dir is writable","handlingStrategy":"validation","validationCode":"// Pre-check both file access and lineage writability\nFileObject inFile = fsManager.resolveFile(inputUri);\nif (inFile.exists() && !inFile.isReadable()) {\n  log.warn(\"Input file not accessible: \" + inputUri);\n}\nFileObject lineageDir = fsManager.resolveFile(lineageDirUri);\nif (!lineageDir.exists() || !lineageDir.isWriteable()) {\n  throw new IllegalStateException(\"Lineage dir unusable: \" + lineageDirUri);\n}","typeGuard":null,"tryCatchPattern":"try {\n  errorHandler.handleNonAccessibleFile(file);\n} catch (KettleException e) {\n  log.error(\"Cannot record inaccessible file \" + file.getName().getURI()\n    + \": \" + e.getMessage(), e);\n  throw e;\n}","preventionTips":["Grant read access on input files to the Kettle process user","Ensure lineage directory is writable; avoid mixing restricted and lineage paths on the same mount","Check for file locks / SELinux denials when files exist but can't open"],"tags":["file-io","permissions","error-handling"],"backgroundTag":"file-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"}