{"record":{"id":"b7c7eb71a4aec9f5","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-file","errorCode":null,"errorMessage":": Unable to load file [","messagePattern":": Unable to load file \\[","errorType":"exception","errorClass":"KettleFileException","httpStatus":null,"severity":"error","filePath":"ui/src/main/java/org/pentaho/di/ui/i18n/editor/Translator.java","lineNumber":543,"sourceCode":"    }\n\n    try {\n      String filename = ROOT + \"/\" + javaFile;\n      StringBuilder content = new StringBuilder( 5000 );\n      FileInputStream stream = new FileInputStream( filename );\n\n      try {\n        int c = 0;\n        while ( ( c = stream.read() ) != -1 ) {\n          content.append( (char) c );\n        }\n      } finally {\n        stream.close();\n      }\n\n      return content.toString();\n    } catch ( Exception e ) {\n      throw new KettleFileException( propertiesFilename\n        + \": Unable to load file [\" + javaFile + \"] for key [\" + entry + \"]\", e );\n    }\n  }\n\n  public String getClassname( String key ) {\n    int idxDot = key.indexOf( '.' );\n    if ( idxDot < 0 ) {\n      return \"\";\n    }\n    return key.substring( 0, idxDot );\n  }\n\n  public String getLocale( String filename ) {\n    // src/be/ibridge/kettle/i18n/messages/messages_nl_NL.properties\n    int idx = filename.length() - MESSAGES_DIR.length() - 3 - LOCALE_LENGTH;\n    return filename.substring( idx, idx + LOCALE_LENGTH );\n  }\n","sourceCodeStart":525,"sourceCodeEnd":561,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/ui/src/main/java/org/pentaho/di/ui/i18n/editor/Translator.java#L525-L561","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\n// key: org.pentaho.di.legacy.Widget.Messages -> Widget.java deleted\nString src = loadJava( key ); // KettleFileException\n\n// after\nFile java = new File( derivedJavaPath );\nif ( !java.exists() ) {\n  log.logBasic( \"Skipping stale key, source missing: \" + derivedJavaPath );\n} else {\n  String src = loadJava( key );\n}","handlingStrategy":"try-catch","validationCode":"if ( !new File( derivedJavaPath ).isFile() ) {\n  log.warn( \"Key \" + entry + \" points to missing source \" + derivedJavaPath );\n}","typeGuard":null,"tryCatchPattern":"try {\n  String src = loadJava( entry );\n} catch ( KettleFileException e ) {\n  log.warn( \"Skipping unreadable source for key \" + entry + \": \" + e.getMessage() );\n}","preventionTips":["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"],"tags":["i18n","file-not-found","translator","source-file"],"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"}