{"record":{"id":"9a38e778f0d30cc1","repo":"pentaho/pentaho-kettle","slug":"exceptionmessage","errorCode":null,"errorMessage":"exceptionMessage","messagePattern":"exceptionMessage","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoad.java","lineNumber":448,"sourceCode":"  /**\n   * Returns the path to the pathToFile. It should be the same as what was passed but this method will check the file\n   * system to see if the path is valid.\n   *\n   * @param pathToFile\n   *          Path to the file to verify.\n   * @param exceptionMessage\n   *          The message to use when the path is not provided.\n   * @param checkExistence\n   *          When true the path's existence will be verified.\n   * @return\n   * @throws KettleException\n   */\n  private String getPath( String pathToFile, String exceptionMessage, boolean checkExistenceOfFile )\n    throws KettleException {\n\n    // Make sure the path is not empty\n    if ( Utils.isEmpty( pathToFile ) ) {\n      throw new KettleException( exceptionMessage );\n    }\n\n    // make sure the variable substitution is not empty\n    pathToFile = environmentSubstitute( pathToFile ).trim();\n    if ( Utils.isEmpty( pathToFile ) ) {\n      throw new KettleException( exceptionMessage );\n    }\n\n    FileObject fileObject = KettleVFS.getInstance( getTransMeta().getBowl() ).getFileObject( pathToFile, getTransMeta() );\n    try {\n      // we either check the existence of the file\n      if ( checkExistenceOfFile ) {\n        if ( !fileObject.exists() ) {\n          throw new KettleException( BaseMessages.getString( PKG, \"GPLoad.Execption.FileDoesNotExist\", pathToFile ) );\n        }\n      } else { // if the file does not have to exist, the parent, or source folder, does.\n        FileObject parentFolder = fileObject.getParent();\n        if ( parentFolder.exists() ) {","sourceCodeStart":430,"sourceCodeEnd":466,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoad.java#L430-L466","documentation":"GPLoad.getPath() throws this KettleException when the path to a required file (gpload utility path, control file, or data file) is empty before variable substitution. The message comes from the caller-supplied exceptionMessage parameter, so it identifies which path was missing.","triggerScenarios":"createCommandLine passes a path field from GPLoadMeta that is null or an empty string, so Utils.isEmpty(pathToFile) is true at the top of getPath().","commonSituations":"The GPLoad utility path or control/data file field left blank in the step dialog; trailing-space-only values; migrating transformations where the path field was never filled in.","solutions":["Open the GPLoad step settings and fill in the empty path field (gpload utility path, control file, or data file).","Verify the value is present at runtime by previewing or logging the step configuration.","If the field uses variables that may be empty, define them in kettle.properties or a Set Variables step before this one."],"exampleFix":"// before (kettle.properties)\nGPLOAD_HOME=\n// after\nGPLOAD_HOME=/usr/local/bin","handlingStrategy":"validation","validationCode":"String path = meta.getGpLoadPath();\nif (path == null || path.trim().isEmpty()) {\n  throw new IllegalStateException(\"GPLoad path field is empty; set it in the step dialog\");\n}","typeGuard":"boolean isNonEmpty(String s) { return s != null && !s.trim().isEmpty(); }","tryCatchPattern":"try {\n  execute();\n} catch (KettleException ke) {\n  logError(\"GPLoad path missing: \" + ke.getMessage(), ke);\n  throw ke;\n}","preventionTips":["Always fill the gpload utility path and file paths in the step dialog before saving","Define all referenced Kettle variables in kettle.properties on every environment","Preview the transformation to catch empty fields before production runs"],"tags":["pdi","kettle","gpload","empty-path","configuration"],"backgroundTag":"empty-required-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"}