pentaho/pentaho-kettle · error · KettleFileException

Unable to get all files from directory [

Error message

Unable to get all files from directory [

What it means

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.

Solutions

  1. 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.
  2. Run the tool from the correct working directory (the PDI installation/design-tools folder) so ROOT resolves.
  3. Fix directory/file permissions for the source tree.
  4. Read the chained cause 'e' in the stack trace for the precise low-level failure.

Example fix

// before
cd /somewhere/wrong
translator.sh   // ROOT = ./src missing -> KettleFileException

// after
cd /opt/pentaho/design-tools/data-integration
translator.sh   // ROOT resolves to existing source folders
Defensive patterns

Strategy: validation

Validate before calling

File root = new File( ROOT );
if ( !root.isDirectory() ) throw new IllegalStateException( "Translator ROOT missing: " + ROOT );

Try / catch

try {
  readFiles();
} catch ( KettleFileException e ) {
  log.error( "Scan of " + ROOT + " failed; check working dir and cause", e );
}

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Understand the failure class

Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/18e80775239f8ba0. Report an issue: GitHub.

Appendix: source

Thrown at ui/src/main/java/org/pentaho/di/ui/i18n/editor/Translator.java:163

        // is it already in there?
        Integer num = directories.get( path );
        if ( num != null ) {
          num = Integer.valueOf( num.intValue() + 1 );
        } else {
          num = Integer.valueOf( 1 );
        }
        directories.put( path, num );

        // What's the locale?
        String locale = getLocale( filename );
        locales.put( locale, Boolean.TRUE );

        if ( locale.charAt( 2 ) != '_' ) {
          log.logError( "This i18n locale file is not conform the Kettle standard: " + filename );
        }
      }
    } catch ( Exception e ) {
      throw new KettleFileException( "Unable to get all files from directory [" + ROOT + "]", e );
    }
  }

  public void open() {
    shell = new Shell( display );
    shell.setLayout( new FillLayout() );
    shell.setText( APP_NAME );

    try {
      readFiles( ROOT );
    } catch ( Exception e ) {
      new ErrorDialog(
        shell, "Error reading translations", "There was an unexpected error reading the translations", e );
    }

    // Put something on the screen
    sashform = new SashForm( shell, SWT.HORIZONTAL );
    sashform.setLayout( new FillLayout() );

View on GitHub (pinned to f3058517a1)