pentaho/pentaho-kettle · warning · KettleException

Forced exception

Error message

Forced exception

What it means

PluginPropertyHandler.Fail is a static sentinel functor whose handle() unconditionally throws a KettleException with the constant MESSAGE "Forced exception". It is a no-op/test placeholder for handlers that must never be invoked; reaching it means code called the Fail instance where a real handler was expected.

Solutions

  1. If intentional (test), expect and catch the resulting FunctorException/KettleException.
  2. If unintentional, replace the Fail.INSTANCE handler with the real handler (e.g. LoadXml or SaveXml).
  3. Check the handler selection/dispatch logic to see why the sentinel default was chosen.

Example fix

// before
PluginPropertyHandler handler = PluginPropertyHandler.Fail.INSTANCE;
handler.execute(property);
// after
PluginPropertyHandler handler = new PluginPropertyHandler.LoadXml(nodes);
handler.execute(property);
Defensive patterns

Strategy: validation

Validate before calling

if (handler instanceof PluginPropertyHandler.Fail) {
  throw new IllegalStateException("Fail sentinel handler selected; configure a real handler");
}

Try / catch

try {
  handler.execute(property);
} catch (FunctorException e) {
  // Fail.INSTANCE always throws; treat as programming/configuration mistake
}

Prevention

When it happens

Trigger: Explicitly executing PluginPropertyHandler.Fail.INSTANCE against a property, or wiring Fail as a default handler that is then actually invoked.

Common situations: Unit tests exercising exception propagation through Functor.execute; accidentally passing Fail.INSTANCE where a real load/save handler should have been configured.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/core/util/PluginPropertyHandler.java:86

   * @author <a href="mailto:thomas.hoedl@aschauer-edv.at">Thomas Hoedl(asc042)</a>
   *
   *         Fail/throws KettleException.
   */
  public static class Fail extends AbstractHandler {

    /**
     * The message.
     */
    public static final String MESSAGE = "Forced exception";

    /**
     * The instance.
     */
    public static final Fail INSTANCE = new Fail();

    @Override
    protected void handle( final PluginProperty property ) throws KettleException {
      throw new KettleException( MESSAGE );
    }

  }

  /**
   * @author <a href="mailto:thomas.hoedl@aschauer-edv.at">Thomas Hoedl(asc042)</a>
   *
   */
  public static class AppendXml extends AbstractHandler {

    private final StringBuilder builder = new StringBuilder();

    @Override
    protected void handle( final PluginProperty property ) {
      property.appendXml( this.builder );
    }

    /**

View on GitHub (pinned to f3058517a1)