{"record":{"id":"07f82dbd4288684b","repo":"pentaho/pentaho-kettle","slug":"error-while-executing-commandline-exit-value-gploadexitval","errorCode":null,"errorMessage":"Error while executing \\'\" + commandLine + \"\\'. Exit value = \" + gpLoadExitVal","messagePattern":"Error while executing \\\\'\" \\+ commandLine \\+ \"\\\\'\\. Exit value = \" \\+ gpLoadExitVal","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoad.java","lineNumber":560,"sourceCode":"      StreamLogger outputLogger = new StreamLogger( gploadProcess.getInputStream(), \"OUTPUT\" );\n\n      // kick them off\n      errorLogger.start();\n      outputLogger.start();\n\n      if ( wait ) {\n        // any error???\n        gpLoadExitVal = gploadProcess.waitFor();\n        logBasic( BaseMessages.getString( PKG, \"GPLoad.Log.ExitValuePsqlPath\", \"\" + gpLoadExitVal ) );\n        if ( gpLoadExitVal != -0 ) {\n          throw new KettleException( BaseMessages.getString( PKG, \"GPLoad.Log.ExitValuePsqlPath\", \"\" + gpLoadExitVal ) );\n        }\n      }\n    } catch ( KettleException ke ) {\n      throw ke;\n    } catch ( Exception ex ) {\n      // Don't throw the message upwards, the message contains the password.\n      throw new KettleException( \"Error while executing \\'\" + commandLine + \"\\'. Exit value = \" + gpLoadExitVal );\n    }\n\n    return true;\n  }\n\n  public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException {\n    meta = (GPLoadMeta) smi;\n    data = (GPLoadData) sdi;\n\n    try {\n      Object[] r = getRow(); // Get row from input rowset & set row busy!\n      // no more input to be expected...\n      if ( r == null ) {\n        setOutputDone();\n\n        if ( !preview ) {\n          if ( output != null ) {\n            // Close the output","sourceCodeStart":542,"sourceCodeEnd":578,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoad.java#L542-L578","documentation":"If execute() throws a generic (non-Kettle) Exception while running or waiting on the gpload process, it is rethrown as a KettleException containing the literal command line and the captured exit value. The original exception message is deliberately discarded because it may contain the gpload password.","triggerScenarios":"Any RuntimeException/IOException during gpload execution (e.g., IOException spawning the process or stream errors) with gpLoadExitVal set; the raw message is replaced by this command-line/exit-value text.","commonSituations":"gpload binary absent or not executable (process spawn failure); environment issues on the executing host; interrupted waits.","solutions":["Inspect the full Kettle stack trace and step log (stderr capture) for the suppressed root cause.","Run the printed commandLine manually as the Pentaho user to reproduce the failure.","Ensure the gpload binary is executable (chmod +x) and present via PATH/GPLOAD_HOME.","Decode the exit value in the message: 127 = command not found, 126 = not executable."],"exampleFix":"// before\n/usr/local/bin/gpload  // lacks execute permission\n// after\nchmod +x /usr/local/bin/gpload","handlingStrategy":"try-catch","validationCode":"File bin = new File(gploadPath);\nif (!bin.canExecute()) {\n  throw new IllegalStateException(\"gpload binary not executable: \" + gploadPath);\n}","typeGuard":null,"tryCatchPattern":"try {\n  execute();\n} catch (KettleException ke) {\n  // message hides the original cause (may contain password); inspect full stack trace\n  logError(\"gpload command failed: \" + ke.getMessage(), ke);\n  throw ke;\n}","preventionTips":["chmod +x the gpload binary and verify PATH/GPLOAD_HOME for the service user","Never assume the original exception text is safe to log (password masking)","Reproduce failures by running the printed commandLine from a shell"],"tags":["pdi","kettle","gpload","process-execution","exit-code"],"backgroundTag":"command-not-found","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"}