{"record":{"id":"2de04a9c0fb09d1e","repo":"pentaho/pentaho-kettle","slug":"the-import-rule-of-type-0-could-not-be-found-in-the-plugin","errorCode":null,"errorMessage":"The import rule of type '{0}' could not be found in the plugin registry.","messagePattern":"The import rule of type '(.+?)' could not be found in the plugin registry\\.","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/imp/ImportRules.java","lineNumber":78,"sourceCode":"\n    for ( ImportRuleInterface rule : rules ) {\n      feedback.addAll( rule.verifyRule( subject ) );\n    }\n\n    return feedback;\n\n  }\n\n  public void loadXML( Node rulesNode ) throws KettleException {\n    List<Node> ruleNodes = XMLHandler.getNodes( rulesNode, BaseImportRule.XML_TAG );\n    for ( Node ruleNode : ruleNodes ) {\n      String id = XMLHandler.getTagValue( ruleNode, \"id\" );\n\n      PluginRegistry registry = PluginRegistry.getInstance();\n\n      PluginInterface plugin = registry.findPluginWithId( ImportRulePluginType.class, id );\n      if ( plugin == null ) {\n        throw new KettleException( \"The import rule of type '\"\n          + id + \"' could not be found in the plugin registry.\" );\n      }\n      ImportRuleInterface rule = (ImportRuleInterface) registry.loadClass( plugin );\n\n      rule.loadXML( ruleNode );\n\n      getRules().add( rule );\n    }\n  }\n\n  public String getXML() {\n    StringBuilder xml = new StringBuilder();\n\n    xml.append( XMLHandler.openTag( XML_TAG ) ).append( Const.CR ).append( Const.CR );\n\n    for ( ImportRuleInterface rule : getRules() ) {\n\n      PluginInterface plugin = PluginRegistry.getInstance().getPlugin( ImportRulePluginType.class, rule.getId() );","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/imp/ImportRules.java#L60-L96","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Install the missing import rule plugin referenced by the id in the XML.","Edit the rules XML to remove or replace the unknown rule id with an installed rule type.","Regenerate the rules XML on the target environment using its own export dialog.","Align Kettle versions/plugins between the environment that exported the rules and the one importing them."],"exampleFix":"// before\n<rule id=\"CustomRuleFromMissingPlugin\">...</rule>\n// after\n<!-- remove the unknown rule or replace with an installed id -->\n<rule id=\"RuleAvailableInThisEnvironment\">...</rule>","handlingStrategy":"validation","validationCode":"for (String id : collectRuleIds(rulesXml)) {\n  if (PluginRegistry.getInstance().findPluginWithId(ImportRulePluginType.class, id) == null) {\n    throw new IllegalArgumentException(\"Rule id not installed in this environment: \" + id);\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  importRules.loadXML(xmlHandler.getRootNode(xml));\n} catch (KettleException e) {\n  if (e.getMessage() != null && e.getMessage().contains(\"could not be found in the plugin registry\")) {\n    log.error(\"Install the missing import rule plugin or edit the rules XML: \" + e.getMessage());\n  } else {\n    throw e;\n  }\n}","preventionTips":["Export rule XML from the same environment that will import it","Keep plugin sets aligned across environments","Never hand-edit rule ids; regenerate via the UI"],"tags":["plugin-registry","xml","missing-plugin"],"backgroundTag":"missing-dependency","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"}