{"record":{"id":"18e80775239f8ba0","repo":"pentaho/pentaho-kettle","slug":"unable-to-get-all-files-from-directory","errorCode":null,"errorMessage":"Unable to get all files from directory [","messagePattern":"Unable to get all files from directory \\[","errorType":"exception","errorClass":"KettleFileException","httpStatus":null,"severity":"error","filePath":"ui/src/main/java/org/pentaho/di/ui/i18n/editor/Translator.java","lineNumber":163,"sourceCode":"        // is it already in there?\n        Integer num = directories.get( path );\n        if ( num != null ) {\n          num = Integer.valueOf( num.intValue() + 1 );\n        } else {\n          num = Integer.valueOf( 1 );\n        }\n        directories.put( path, num );\n\n        // What's the locale?\n        String locale = getLocale( filename );\n        locales.put( locale, Boolean.TRUE );\n\n        if ( locale.charAt( 2 ) != '_' ) {\n          log.logError( \"This i18n locale file is not conform the Kettle standard: \" + filename );\n        }\n      }\n    } catch ( Exception e ) {\n      throw new KettleFileException( \"Unable to get all files from directory [\" + ROOT + \"]\", e );\n    }\n  }\n\n  public void open() {\n    shell = new Shell( display );\n    shell.setLayout( new FillLayout() );\n    shell.setText( APP_NAME );\n\n    try {\n      readFiles( ROOT );\n    } catch ( Exception e ) {\n      new ErrorDialog(\n        shell, \"Error reading translations\", \"There was an unexpected error reading the translations\", e );\n    }\n\n    // Put something on the screen\n    sashform = new SashForm( shell, SWT.HORIZONTAL );\n    sashform.setLayout( new FillLayout() );","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/ui/src/main/java/org/pentaho/di/ui/i18n/editor/Translator.java#L145-L181","documentation":"The legacy Translator tool's readFiles() scans the ROOT directory for messages_*.properties files and throws KettleFileException if anything goes wrong while listing/reading them. It is a coarse catch-all: any exception while walking the i18n directory tree or parsing locale filenames ends here.","triggerScenarios":"readFiles() runs against a ROOT folder that does not exist, is unreadable, or contains a file that triggers an exception during processing (bad filename encoding, IO error mid-scan).","commonSituations":"Running the Translator from a working directory where the expected ./src or distribution layout is absent; permission-restricted source trees; non-ASCII locale filenames mangled by the OS encoding.","solutions":["Verify the Translator's root directory (ROOT) exists and contains messages_*.properties files; check the log line 'This i18n locale file is not conform the Kettle standard' for offending names.","Run the tool from the correct working directory (the PDI installation/design-tools folder) so ROOT resolves.","Fix directory/file permissions for the source tree.","Read the chained cause 'e' in the stack trace for the precise low-level failure."],"exampleFix":"// before\ncd /somewhere/wrong\ntranslator.sh   // ROOT = ./src missing -> KettleFileException\n\n// after\ncd /opt/pentaho/design-tools/data-integration\ntranslator.sh   // ROOT resolves to existing source folders","handlingStrategy":"validation","validationCode":"File root = new File( ROOT );\nif ( !root.isDirectory() ) throw new IllegalStateException( \"Translator ROOT missing: \" + ROOT );","typeGuard":null,"tryCatchPattern":"try {\n  readFiles();\n} catch ( KettleFileException e ) {\n  log.error( \"Scan of \" + ROOT + \" failed; check working dir and cause\", e );\n}","preventionTips":["Launch the Translator from the PDI installation directory so ROOT resolves","Ensure messages_*.properties files use the standard naming convention","Verify read permissions on the i18n source tree"],"tags":["i18n","file-io","translator","directory-scan"],"backgroundTag":"file-read-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"}