{"record":{"id":"3e109b5eab7992e1","repo":"pentaho/pentaho-kettle","slug":"gpload-execption-unhandledloadmethod","errorCode":null,"errorMessage":"GPload.Execption.UnhandledLoadMethod","messagePattern":"GPload\\.Execption\\.UnhandledLoadMethod","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoad.java","lineNumber":609,"sourceCode":"          if ( GPLoadMeta.METHOD_AUTO_END.equals( loadMethod ) ) {\n\n            // if we actually wrote at least one row\n            if ( getLinesOutput() > 0 ) {\n\n              // we do this\n              createControlFile( meta );\n              execute( meta, true );\n            } else {\n              // we don't create a control file and execute\n              logBasic( BaseMessages.getString( PKG, \"GPLoad.Info.NoRowsWritten\" ) );\n            }\n          } else if ( GPLoadMeta.METHOD_MANUAL.equals( loadMethod ) ) {\n\n            // we create the control file but do not execute\n            createControlFile( meta );\n            logBasic( BaseMessages.getString( PKG, \"GPLoad.Info.MethodManual\" ) );\n          } else {\n            throw new KettleException( BaseMessages.getString( PKG, \"GPload.Execption.UnhandledLoadMethod\", loadMethod ) );\n          }\n        }\n        return false;\n      }\n\n      if ( !preview ) {\n        if ( first ) {\n          first = false;\n          output = new GPLoadDataOutput( this, meta, log.getLogLevel() );\n\n          // if ( GPLoadMeta.METHOD_AUTO_CONCURRENT.equals(meta.getLoadMethod()) )\n          // {\n          // execute(meta, false);\n          // }\n          output.open( this, gploadProcess );\n        }\n        output.writeLine( getInputRowMeta(), r );\n      }","sourceCodeStart":591,"sourceCodeEnd":627,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoad.java#L591-L627","documentation":"processRow() dispatches on the configured load method; only 'auto-construct' (load to file then gpload) and 'manual' (build control file only) are supported. Any other value returned by meta.getLoadMethod() throws this KettleException with key GPload.Execption.UnhandledLoadMethod and the offending method value.","triggerScenarios":"meta.getLoadMethod() returns a string matching neither GPLoadMeta.METHOD_AUTO_CONSTRUCT nor METHOD_MANUAL - normally only possible with corrupted, hand-edited, or version-incompatible step metadata.","commonSituations":"Hand-edited transformation (ktr) XML; migrating steps across Pentaho versions where method constants changed; third-party tools writing invalid metadata values.","solutions":["Open the GPLoad step dialog and reselect a valid Load Method (Auto construct or Manual), then save.","Inspect the ktr XML for the load method element and correct it to a valid constant.","Recreate the step if the metadata is corrupted; verify plugin versions match your Pentaho version.","Check for custom or patched GPLoadMeta code that could emit an unsupported method value."],"exampleFix":"// before (ktr xml)\n<load_method>custom_method</load_method>\n// after\n<load_method>auto-construct</load_method>","handlingStrategy":"validation","validationCode":"String method = meta.getLoadMethod();\nif (!GPLoadMeta.METHOD_AUTO_CONSTRUCT.equals(method) && !GPLoadMeta.METHOD_MANUAL.equals(method)) {\n  throw new IllegalStateException(\"Unsupported load method in metadata: \" + method);\n}","typeGuard":"boolean isValidLoadMethod(String m) {\n  return GPLoadMeta.METHOD_AUTO_CONSTRUCT.equals(m) || GPLoadMeta.METHOD_MANUAL.equals(m);\n}","tryCatchPattern":"try {\n  processRow();\n} catch (KettleException ke) {\n  if (ke.getMessage().contains(\"UnhandledLoadMethod\")) {\n    logError(\"Fix load_method in the GPLoad step dialog or ktr XML\", ke);\n  }\n  throw ke;\n}","preventionTips":["Never hand-edit load method values in ktr XML; use the step dialog","Keep Pentaho and GPLoad plugin versions aligned across environments","Validate transformations after migrating between versions"],"tags":["pdi","kettle","gpload","invalid-enum-value","metadata"],"backgroundTag":"invalid-enum-value","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"}