{"record":{"id":"1440246c2fa6c793","repo":"pentaho/pentaho-kettle","slug":"unable-to-find-image-file-imagefile-for-plugin-plugin","errorCode":null,"errorMessage":"Unable to find image file: <imageFile> for plugin: <plugin>","messagePattern":"Unable to find image file: <imageFile> for plugin: <plugin>","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/core/gui/SwingGUIResource.java","lineNumber":91,"sourceCode":"          + plugin.getName() + \" (id=\" + plugin.getIds()[0] + \")\", e );\n      }\n    }\n\n    return map;\n  }\n\n  private Map<String, SwingUniversalImage> loadEntryImages() {\n    Map<String, SwingUniversalImage> map = new HashMap<>();\n\n    for ( PluginInterface plugin : PluginRegistry.getInstance().getPlugins( JobEntryPluginType.class ) ) {\n      try {\n        if ( JobMeta.STRING_SPECIAL.equals( plugin.getIds()[0] ) ) {\n          continue;\n        }\n\n        SwingUniversalImage image = getUniversalImageIcon( plugin );\n        if ( image == null ) {\n          throw new KettleException( \"Unable to find image file: \"\n            + plugin.getImageFile() + \" for plugin: \" + plugin );\n        }\n\n        map.put( plugin.getIds()[0], image );\n      } catch ( Exception e ) {\n        log.logError( \"Unable to load job entry icon image for plugin: \"\n          + plugin.getName() + \" (id=\" + plugin.getIds()[0] + \")\", e );\n      }\n    }\n\n    return map;\n  }\n\n  private SwingUniversalImage getUniversalImageIcon( PluginInterface plugin ) throws KettleException {\n    try {\n      PluginRegistry registry = PluginRegistry.getInstance();\n      String filename = plugin.getImageFile();\n","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/core/gui/SwingGUIResource.java#L73-L109","documentation":"Thrown by SwingGUIResource.loadEntryImages when the plugin registry reports an image file for a job/plugin entry but SwingGUIResource.getUniversalImageIcon cannot resolve it to a SwingUniversalImage (returned null). Pentaho Kettle loads all entry/step icons at GUI startup into a map keyed by plugin id; a missing icon breaks GUI resource initialization.","triggerScenarios":"A plugin declares an imageFile in its plugin.xml/annotation that does not exist on the classpath or in the plugin's jar/folder, so getUniversalImageIcon returns null after exhausting all lookup locations.","commonSituations":"Hand-written plugin.xml with a typo in <image-file>; plugin jar repackaged without image resources; renamed/moved icon files after an upgrade; plugin folder copied without resource files.","solutions":["Verify the imageFile path declared by the plugin exists on the classpath or inside the plugin jar/zip at the exact path","Fix the plugin.xml image-file entry or @Injection/@Step metadata to point at the actual icon resource","Rebuild/redeploy the plugin including its resources (icons often excluded by build filters)","Clear the plugin cache folder and restart so stale plugin folders are re-scanned"],"exampleFix":"// before (plugin.xml)\n<image-file>icons/wrng.png</image-file>\n// after\n<image-file>icons/wrong.png</image-file>","handlingStrategy":"validation","validationCode":"String img = plugin.getImageFile();\nif (img == null || getClass().getResourceAsStream(img) == null && !new java.io.File(img).exists()) {\n  throw new IllegalStateException(\"Icon resource missing for plugin \" + plugin.getIds()[0] + \": \" + img);\n}","typeGuard":null,"tryCatchPattern":"try { SwingUniversalImage image = getUniversalImageIcon(plugin); }\ncatch (KettleException e) { log.logError(\"Skipping icon for \" + plugin.getIds()[0], e); continue; }","preventionTips":["Keep icons under src/main/resources so build tools package them","Verify plugin jars contain the declared image paths before deployment","Diff plugin.xml image-file entries against actual packaged files in CI"],"tags":["pentaho-kettle","gui","resources","plugin-loading"],"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"}