{"record":{"id":"eaa6b77a132222d6","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-partitioning-plugin","errorCode":null,"errorMessage":"Unable to load partitioning plugin","messagePattern":"Unable to load partitioning plugin","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/step/StepPartitioningMeta.java","lineNumber":78,"sourceCode":"   * @param partitionSchema\n   */\n  public StepPartitioningMeta( String method, PartitionSchema partitionSchema ) throws KettlePluginException {\n    setMethod( method );\n    this.partitionSchema = partitionSchema;\n    hasChanged = false;\n  }\n\n  public StepPartitioningMeta clone() {\n    try {\n      StepPartitioningMeta stepPartitioningMeta =\n        new StepPartitioningMeta( method, partitionSchema != null\n          ? (PartitionSchema) partitionSchema.clone() : null );\n      stepPartitioningMeta.partitionSchemaName = partitionSchemaName;\n      stepPartitioningMeta.setMethodType( methodType );\n      stepPartitioningMeta.setPartitioner( partitioner == null ? null : partitioner.clone() );\n      return stepPartitioningMeta;\n    } catch ( KettlePluginException e ) {\n      throw new RuntimeException( \"Unable to load partitioning plugin\", e );\n    }\n  }\n\n  /**\n   * @return true if the partition schema names are the same.\n   */\n  @Override\n  public boolean equals( Object obj ) {\n    if ( obj == null ) {\n      return false;\n    }\n    if ( partitionSchemaName == null ) {\n      return false;\n    }\n    StepPartitioningMeta meta = (StepPartitioningMeta) obj;\n    if ( meta.partitionSchemaName == null ) {\n      return false;\n    }","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/step/StepPartitioningMeta.java#L60-L96","documentation":"StepPartitioningMeta.clone() wraps KettlePluginException in an unchecked RuntimeException when the partitioner plugin cannot be loaded while cloning the step partitioning metadata. This is an internal clone operation, so the failure is almost always a missing or broken partitioner plugin registration.","triggerScenarios":"Calling clone() on a StepPartitioningMeta whose method/type requires loading a partitioner plugin (via partitioner.clone() -> KettlePartitioner registry); the plugin fails to load with KettlePluginException and gets rethrown as RuntimeException.","commonSituations":"Referenced partitioning method (e.g. custom partitioner plugin) not installed on the node cloning the transformation; plugin registry not initialized in embedded/headless usage of Kettle; cluster executions where slave nodes lack the partitioner plugin.","solutions":["Install/register the partitioner plugin that the step's partitioning method references","Call KettleEnvironment.init() (which initializes the plugin registry) before loading/cloning transformations","Check the cause chain of the RuntimeException for the underlying KettlePluginException","Ensure all cluster slave nodes have the same plugin set as the master"],"exampleFix":"// before\nKettleVFS.getInstance(); // plugin registry not initialized, clone() fails\n// after\nKettleEnvironment.init(); // initialize plugin registry first\nstepPartitioningMeta = originalStepPartitioningMeta.clone();","handlingStrategy":"try-catch","validationCode":"// Before cloning, verify the partitioner plugin loads\nKettlePartitioner partitioner = stepPartitioningMeta.getPartitioner();\nif (partitioner != null &&\n    PluginRegistry.getInstance().getPlugin(\n      PartitionerPluginType.class, partitioner.getClass().getName()) == null) {\n  throw new IllegalStateException(\"Partitioner plugin not registered: \" + partitioner.getClass());\n}","typeGuard":"boolean partitionerLoadable(StepPartitioningMeta meta) {\n  try { if (meta.getPartitioner() != null) meta.getPartitioner().clone(); return true; }\n  catch (Exception e) { return false; }\n}","tryCatchPattern":"try {\n  StepPartitioningMeta clone = stepPartitioningMeta.clone();\n} catch (RuntimeException e) {\n  Throwable cause = e.getCause();\n  if (cause instanceof KettlePluginException) {\n    log.error(\"Partitioner plugin missing: \" + cause.getMessage());\n    // load plugin or abort clone\n  }\n  throw e;\n}","preventionTips":["Call KettleEnvironment.init() before any transformation metadata operations","Install partitioner plugins on every node (master and slaves)","Verify plugin availability with PluginRegistry before cloning/loading"],"tags":["plugin-loading","clone","partitioning"],"backgroundTag":"plugin-load-failed","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"}