{"record":{"id":"dce2b4c4c4bb8ccf","repo":"pentaho/pentaho-kettle","slug":"no-psql-application-specified","errorCode":null,"errorMessage":"No psql application specified","messagePattern":"No psql application specified","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/gp-bulk-loader/core/src/main/java/org/pentaho/di/trans/steps/gpbulkloader/GPBulkLoader.java","lineNumber":322,"sourceCode":"   *\n   * @throws KettleException\n   *           Upon any exception\n   */\n  public String createCommandLine( GPBulkLoaderMeta meta, boolean password ) throws KettleException {\n    StringBuffer sb = new StringBuffer( 300 );\n\n    if ( meta.getPsqlpath() != null ) {\n      try {\n        FileObject fileObject =\n          KettleVFS.getInstance( getTransMeta().getBowl() )\n            .getFileObject( environmentSubstitute( meta.getPsqlpath() ), getTransMeta() );\n        String psqlexec = KettleVFS.getFilename( fileObject );\n        sb.append( enclosure ).append( psqlexec ).append( enclosure );\n      } catch ( Exception ex ) {\n        throw new KettleException( \"Error retrieving sqlldr string\", ex );\n      }\n    } else {\n      throw new KettleException( \"No psql application specified\" );\n    }\n\n    if ( meta.getControlFile() != null ) {\n      try {\n        FileObject fileObject =\n          KettleVFS.getInstance( getTransMeta().getBowl() )\n            .getFileObject( environmentSubstitute( meta.getControlFile() ), getTransMeta() );\n\n        sb.append( \" -n -f \" );\n        sb.append( enclosure ).append( KettleVFS.getFilename( fileObject ) ).append( enclosure );\n      } catch ( Exception ex ) {\n        throw new KettleException( \"Error retrieving controlfile string\", ex );\n      }\n    } else {\n      throw new KettleException( \"No control file specified\" );\n    }\n\n    if ( meta.getLogFile() != null ) {","sourceCodeStart":304,"sourceCodeEnd":340,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/gp-bulk-loader/core/src/main/java/org/pentaho/di/trans/steps/gpbulkloader/GPBulkLoader.java#L304-L340","documentation":"createCommandLine() requires an executable path for psql in the step metadata. When meta.getPsqlpath() is null (the field was left empty), it throws this KettleException instead of attempting to build a command line. It is a required-field validation error raised by the step itself.","triggerScenarios":"execute() -> createCommandLine() runs with meta.getPsqlpath() == null, i.e. the 'Location of psql' / executable field in the GP Bulk Loader step was never filled in or the metadata was loaded without that attribute.","commonSituations":"User created the step but left the psql executable path blank; a transformation XML from an older plugin version lacks the psqlpath attribute; the step was built programmatically with GPBulkLoaderMeta without calling setPsqlpath(); wrong meta object passed in unit tests with empty defaults.","solutions":["Open the GP Bulk Loader step settings and set the full path to the psql executable (e.g. /usr/local/greenplum-db/bin/psql).","If building metadata in code, call meta.setPsqlpath(...) before execute().","If loading from XML, verify the saved transformation contains the psqlpath element; re-save the step with a modern plugin version.","Guard with a validation check before running the transformation to fail fast with a clearer message."],"exampleFix":"// before (code-built meta)\nGPBulkLoaderMeta meta = new GPBulkLoaderMeta();\nexecute(meta, true);\n\n// after\nGPBulkLoaderMeta meta = new GPBulkLoaderMeta();\nmeta.setPsqlpath(\"/usr/local/greenplum-db/bin/psql\");\nexecute(meta, true);","handlingStrategy":"validation","validationCode":"if (meta.getPsqlpath() == null || meta.getPsqlpath().trim().isEmpty()) {\n  throw new IllegalArgumentException(\n    \"GP Bulk Loader: psql executable path is required before execute()\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  execute(meta, wait);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"No psql application specified\")) {\n    meta.setPsqlpath(defaultPsqlPath());\n    execute(meta, wait);\n  } else throw e;\n}","preventionTips":["Always fill the psql path in the step dialog before saving","Run Spoon's step 'Check' to catch missing required fields early","When constructing meta in code, set psqlpath immediately after instantiation"],"tags":["missing-config","psql-path","required-field","kettle"],"backgroundTag":"missing-required-config-field","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"}