pentaho/pentaho-kettle · error · KettleFileException
: Unable to load file [
Error message
: Unable to load file [
What it means
Translator.loadJava() reads a Java source file to verify an i18n key's usage and throws KettleFileException with the properties filename, java file and key when reading fails. It means the Java file backing a key could not be loaded — usually because the file path derived from the key's package no longer exists or cannot be opened.
Solutions
- Check the javaFile path in the message exists on disk; reload the Translator configuration with the current source folder.
- Remove or update stale i18n keys that reference deleted classes/packages.
- Verify permissions on the source tree.
- Inspect the chained cause for the exact IO error.
Example fix
// before
// key: org.pentaho.di.legacy.Widget.Messages -> Widget.java deleted
String src = loadJava( key ); // KettleFileException
// after
File java = new File( derivedJavaPath );
if ( !java.exists() ) {
log.logBasic( "Skipping stale key, source missing: " + derivedJavaPath );
} else {
String src = loadJava( key );
} Defensive patterns
Strategy: try-catch
Validate before calling
if ( !new File( derivedJavaPath ).isFile() ) {
log.warn( "Key " + entry + " points to missing source " + derivedJavaPath );
} Try / catch
try {
String src = loadJava( entry );
} catch ( KettleFileException e ) {
log.warn( "Skipping unreadable source for key " + entry + ": " + e.getMessage() );
} Prevention
- Reload the Translator after refactorings that move classes or packages
- Prune i18n keys whose backing classes no longer exist
- Keep the configured source folder in sync with the checked-out code
When it happens
Trigger: refreshGrid resolves an i18n key to a Java source file (package -> path) and loadJava() fails: the source file was moved/renamed/deleted, the source folder config is wrong, or an IO error occurs while streaming the file.
Common situations: Keys pointing at classes removed by refactoring; Translator configured against a source folder from an older checkout; packages renamed so the derived Java path is stale.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- i18n.Log.UnableToGetFiles
- package file could not be found for file in folder
- Unable to get all files from directory [
- AccessInput.Log.RequiredFilesMissing
- AvroInput.Error.SchemaError
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/b7c7eb71a4aec9f5.
Report an issue: GitHub.
Appendix: source
Thrown at ui/src/main/java/org/pentaho/di/ui/i18n/editor/Translator.java:543
}
try {
String filename = ROOT + "/" + javaFile;
StringBuilder content = new StringBuilder( 5000 );
FileInputStream stream = new FileInputStream( filename );
try {
int c = 0;
while ( ( c = stream.read() ) != -1 ) {
content.append( (char) c );
}
} finally {
stream.close();
}
return content.toString();
} catch ( Exception e ) {
throw new KettleFileException( propertiesFilename
+ ": Unable to load file [" + javaFile + "] for key [" + entry + "]", e );
}
}
public String getClassname( String key ) {
int idxDot = key.indexOf( '.' );
if ( idxDot < 0 ) {
return "";
}
return key.substring( 0, idxDot );
}
public String getLocale( String filename ) {
// src/be/ibridge/kettle/i18n/messages/messages_nl_NL.properties
int idx = filename.length() - MESSAGES_DIR.length() - 3 - LOCALE_LENGTH;
return filename.substring( idx, idx + LOCALE_LENGTH );
}
View on GitHub (pinned to f3058517a1)