pentaho/pentaho-kettle · error · KettleException

Unable to find file: for plugin

Error message

Unable to find file: <imageFile> for plugin: <plugin>

What it means

getUniversalImageIcon throws this when, after trying to load the plugin's image from the classpath and filesystem locations, no SwingUniversalImage could be created. It is the 'icon resource not found' signal for plugin images in the Swing GUI.

Solutions

  1. Open the plugin jar and confirm the image file exists at the declared path
  2. Correct the imageFile declaration in plugin.xml or the plugin annotation
  3. Rebuild the plugin with resources included (check maven resource includes/excludes)
  4. Ensure the plugin folder structure matches what Kettle expects (e.g. plugin/lib + images)

Example fix

// before
imageFile = "icons/stepX.png"; // file never packaged
// after
imageFile = "images/stepX.png"; // packaged under src/main/resources/images
Defensive patterns

Strategy: validation

Validate before calling

try (InputStream in = loader.getResourceAsStream(plugin.getImageFile())) {
  if (in == null) throw new IllegalStateException("Image not on classpath: " + plugin.getImageFile());
}

Try / catch

try { image = getUniversalImageIcon(plugin); }
catch (KettleException e) { log.warn("Fallback default icon for " + plugin.getIds()[0]); image = defaultImage; }

Prevention

When it happens

Trigger: Calling SwingGUIResource image loading for a plugin whose getImageFile() points to a resource that cannot be opened via any registered ClassLoader or file path; inputStream is null for every candidate location.

Common situations: Plugin installed in a directory whose images subfolder is missing; jar built with resource filtering/exclusion; wrong relative path casing on case-sensitive filesystems.

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


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/core/gui/SwingGUIResource.java:188

            // Ignore, throws error below
          }
        }
        if ( inputStream != null ) {
          try {
            BufferedImage bitmap = ImageIO.read( inputStream );

            WaitingImageObserver wia = new WaitingImageObserver( bitmap );
            wia.waitImageLoaded();

            image = new SwingUniversalImageBitmap( bitmap );
          } finally {
            IOUtils.closeQuietly( inputStream );
          }
        }
      }

      if ( image == null ) {
        throw new KettleException( "Unable to find file: " + plugin.getImageFile() + " for plugin: " + plugin );
      }

      return image;
    } catch ( Throwable e ) {
      throw new KettleException( "Unable to load image from file : '"
        + plugin.getImageFile() + "' for plugin: " + plugin, e );
    }
  }

  public Map<String, SwingUniversalImage> getEntryImages() {
    return entryImages;
  }

  public Map<String, SwingUniversalImage> getStepImages() {
    return stepImages;
  }
}

View on GitHub (pinned to f3058517a1)