{"record":{"id":"dc80c93e96ad4f1d","repo":"pentaho/pentaho-kettle","slug":"pantransformationdelegate-error-noexecutiontypespecified","errorCode":null,"errorMessage":"PanTransformationDelegate.Error.NoExecutionTypeSpecified","messagePattern":"PanTransformationDelegate\\.Error\\.NoExecutionTypeSpecified","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/pan/delegates/PanTransformationDelegate.java","lineNumber":149,"sourceCode":"  /**\n   * Execute transformation based on the execution configuration type.\n   */\n  private Result executeBasedOnConfiguration( TransMeta transMeta,\n                                              TransExecutionConfiguration executionConfiguration,\n                                              String[] arguments ) throws KettleException {\n\n    if ( executionConfiguration.isExecutingLocally() ) {\n      return transformationExecutorServiceMap.get( LOCAL )\n        .execute( log, transMeta, repository, executionConfiguration, arguments );\n    } else if ( executionConfiguration.isExecutingRemotely() ) {\n      return transformationExecutorServiceMap.get( REMOTE )\n        .execute( log, transMeta, repository, executionConfiguration, arguments );\n    } else if ( executionConfiguration.isExecutingClustered() ) {\n      return transformationExecutorServiceMap.get( CLUSTERED )\n        .execute( log, transMeta, repository, executionConfiguration, arguments );\n\n    } else {\n      throw new KettleException( BaseMessages.getString( pkg, \"PanTransformationDelegate.Error.NoExecutionTypeSpecified\" ) );\n    }\n  }\n\n  /**\n   * Create a default execution configuration for command-line execution.\n   */\n  public TransExecutionConfiguration createDefaultExecutionConfiguration() {\n    TransExecutionConfiguration config = new TransExecutionConfiguration();\n\n    // Set defaults for command-line execution\n    config.setExecutingLocally( true );\n    config.setExecutingRemotely( false );\n    config.setExecutingClustered( false );\n    config.setClearingLog( true );\n    config.setSafeModeEnabled( false );\n    config.setGatheringMetrics( false );\n    config.setLogLevel( LogLevel.BASIC );\n","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/pan/delegates/PanTransformationDelegate.java#L131-L167","documentation":"executeBasedOnConfiguration throws KettleException when the TransExecutionConfiguration requests neither local, remote, nor clustered execution — none of the executor branches match. Every pan run must set an execution type.","triggerScenarios":"Passing a TransExecutionConfiguration where isExecutingLocally(), isExecutingRemoted(), and isExecutingClustered() all return false, then invoking the delegate's executeTransformation.","commonSituations":"Programmatic pan usage building a custom configuration without calling setExecutingClustered/setRemoteServer/setLocal; a config deserialized from XML that lost its execution flags.","solutions":["Set an execution mode, e.g. executionConfiguration.setExecutingLocally(true) (or setLocal(true) depending on version)","For remote runs, call setRemoteServer(new SlaveServer(...)) which also sets the remote flag","Use TransExecutionConfigurationFactory / delegate's createDefaultConfiguration for a sane default","Inspect the flags with getRemoteServer()/isExecutingClustered() before calling execute"],"exampleFix":"// before\nTransExecutionConfiguration cfg = new TransExecutionConfiguration();\ndelegate.executeTransformation(trans, cfg, args);\n// after\nTransExecutionConfiguration cfg = new TransExecutionConfiguration();\ncfg.setExecutingLocally(true);\ndelegate.executeTransformation(trans, cfg, args);","handlingStrategy":"validation","validationCode":"TransExecutionConfiguration cfg = ...;\nif (!cfg.isExecutingLocally() && !cfg.isExecutingRemoted() && !cfg.isExecutingClustered()) {\n  cfg.setExecutingLocally(true); // or fail fast\n  // or: throw new IllegalStateException(\"No execution type set on configuration\");\n}","typeGuard":"static boolean hasExecutionType(TransExecutionConfiguration c) {\n  return c != null && (c.isExecutingLocally() || c.isExecutingRemoted() || c.isExecutingClustered());\n}","tryCatchPattern":"try {\n  delegate.executeTransformation(trans, cfg, args);\n} catch (KettleException e) {\n  if (e.getMessage() != null && e.getMessage().endsWith(\"NoExecutionTypeSpecified\")) {\n    cfg.setExecutingLocally(true);\n    // retry or report misconfiguration\n  } else throw e;\n}","preventionTips":["Start from delegate.createDefaultConfiguration() instead of a bare TransExecutionConfiguration","Set exactly one execution flag per run","Unit-test configuration builders to assert an execution type is set","Centralize config construction in one factory method"],"tags":["pan","execution-configuration","missing-flag"],"backgroundTag":"missing-required-option","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"}