pentaho/pentaho-kettle · error · KettleException

The import rule of type

Error message

The import rule of type '{0}' could not be found in the plugin registry.

What it means

ImportRules.loadXML reads import rule definitions from XML and resolves each rule's <id> through the PluginRegistry (findPluginWithId on ImportRulePluginType). It throws KettleException "The import rule of type '{0}' could not be found in the plugin registry" when no registered plugin matches the id. The rule XML references a rule type that this Kettle installation does not have installed.

Solutions

  1. Install the missing import rule plugin referenced by the id in the XML.
  2. Edit the rules XML to remove or replace the unknown rule id with an installed rule type.
  3. Regenerate the rules XML on the target environment using its own export dialog.
  4. Align Kettle versions/plugins between the environment that exported the rules and the one importing them.

Example fix

// before
<rule id="CustomRuleFromMissingPlugin">...</rule>
// after
<!-- remove the unknown rule or replace with an installed id -->
<rule id="RuleAvailableInThisEnvironment">...</rule>
Defensive patterns

Strategy: validation

Validate before calling

for (String id : collectRuleIds(rulesXml)) {
  if (PluginRegistry.getInstance().findPluginWithId(ImportRulePluginType.class, id) == null) {
    throw new IllegalArgumentException("Rule id not installed in this environment: " + id);
  }
}

Try / catch

try {
  importRules.loadXML(xmlHandler.getRootNode(xml));
} catch (KettleException e) {
  if (e.getMessage() != null && e.getMessage().contains("could not be found in the plugin registry")) {
    log.error("Install the missing import rule plugin or edit the rules XML: " + e.getMessage());
  } else {
    throw e;
  }
}

Prevention

When it happens

Trigger: Loading an export-rules XML file that contains a rule id from a plugin not installed in the current environment; version mismatch where the XML was generated by a newer/other Kettle with extra rule plugins; typo or stale rule id in hand-edited XML.

Common situations: Moving export/import rule configurations between environments where plugin sets differ; upgrading/downgrading Pentaho Data Integration so a previously available rule plugin disappears; hand-editing rule XML files.

Understand the failure class

Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/imp/ImportRules.java:78

    for ( ImportRuleInterface rule : rules ) {
      feedback.addAll( rule.verifyRule( subject ) );
    }

    return feedback;

  }

  public void loadXML( Node rulesNode ) throws KettleException {
    List<Node> ruleNodes = XMLHandler.getNodes( rulesNode, BaseImportRule.XML_TAG );
    for ( Node ruleNode : ruleNodes ) {
      String id = XMLHandler.getTagValue( ruleNode, "id" );

      PluginRegistry registry = PluginRegistry.getInstance();

      PluginInterface plugin = registry.findPluginWithId( ImportRulePluginType.class, id );
      if ( plugin == null ) {
        throw new KettleException( "The import rule of type '"
          + id + "' could not be found in the plugin registry." );
      }
      ImportRuleInterface rule = (ImportRuleInterface) registry.loadClass( plugin );

      rule.loadXML( ruleNode );

      getRules().add( rule );
    }
  }

  public String getXML() {
    StringBuilder xml = new StringBuilder();

    xml.append( XMLHandler.openTag( XML_TAG ) ).append( Const.CR ).append( Const.CR );

    for ( ImportRuleInterface rule : getRules() ) {

      PluginInterface plugin = PluginRegistry.getInstance().getPlugin( ImportRulePluginType.class, rule.getId() );

View on GitHub (pinned to f3058517a1)