{"record":{"id":"3b83aba2626dafb2","repo":"pentaho/pentaho-kettle","slug":"gpload-exception-gploadcommandbuild","errorCode":null,"errorMessage":"GPLoad.Exception.GPLoadCommandBuild","messagePattern":"GPLoad\\.Exception\\.GPLoadCommandBuild","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoad.java","lineNumber":482,"sourceCode":"      } else { // if the file does not have to exist, the parent, or source folder, does.\n        FileObject parentFolder = fileObject.getParent();\n        if ( parentFolder.exists() ) {\n          return KettleVFS.getFilename( fileObject );\n        } else {\n          throw new KettleException( BaseMessages.getString( PKG, \"GPLoad.Exception.DirectoryDoesNotExist\",\n              parentFolder.getURL().getPath() ) );\n        }\n\n      }\n\n      // if Windows is the OS\n      if ( Const.getOS().startsWith( \"Windows\" ) ) {\n        return addQuotes( pathToFile );\n      } else {\n        return KettleVFS.getFilename( fileObject );\n      }\n    } catch ( FileSystemException fsex ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"GPLoad.Exception.GPLoadCommandBuild\", fsex.getMessage() ) );\n    }\n  }\n\n  /**\n   * Create the command line for GPLoad depending on the meta information supplied.\n   *\n   * @param meta\n   *          The meta data to create the command line from\n   * @param password\n   *          Use the real password or not\n   *\n   * @return The string to execute.\n   *\n   * @throws KettleException\n   *           Upon any exception\n   */\n  public String createCommandLine( GPLoadMeta meta, boolean password ) throws KettleException {\n","sourceCodeStart":464,"sourceCodeEnd":500,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoad.java#L464-L500","documentation":"getPath() wraps any Apache Commons VFS FileSystemException raised while resolving or inspecting the file (or its parent) into a KettleException with key GPLoad.Exception.GPLoadCommandBuild, embedding fsex.getMessage(). It signals the gpload command line could not be built because the filesystem layer failed.","triggerScenarios":"KettleVFS.getFileObject() or fileObject.exists()/getParent()/getURL() throws FileSystemException - e.g., an invalid or unsupported URI scheme, malformed path characters, or VFS provider errors.","commonSituations":"Paths with characters VFS cannot parse (unescaped spaces or symbols, bad Windows paths); unsupported URI scheme; VFS misconfiguration or missing provider; network filesystem unreachable.","solutions":["Fix the path syntax in the step settings (quote/escape spaces and special characters, especially on Windows).","Check the embedded fsex message in the stack trace to identify the VFS-level cause.","Use a plain local filesystem path if a remote or unusual scheme is failing.","Verify Kettle VFS configuration and that the target filesystem is reachable."],"exampleFix":"// before\nString path = \"C:\\Program Files\\gpload\\gpload.exe\"; // unescaped backslashes/spaces\n// after\nString path = \"C:/PROGRA~1/gpload/gpload.exe\"; // or properly escaped path","handlingStrategy":"try-catch","validationCode":"String path = \"/opt/gp load/gpload\";\nif (path.matches(\".*[^\\\\w/.:~-].*\")) {\n  logBasic(\"Warning: path contains characters that may break VFS: \" + path);\n}","typeGuard":null,"tryCatchPattern":"try {\n  execute();\n} catch (KettleException ke) {\n  Throwable root = ke;\n  while (root.getCause() != null) root = root.getCause();\n  logError(\"VFS failure building gpload command: \" + root.getMessage(), ke);\n  throw ke;\n}","preventionTips":["Avoid spaces and special characters in gpload-related paths","Prefer plain local filesystem paths over exotic VFS schemes","Read the embedded fsex message in the exception to pinpoint the VFS cause"],"tags":["pdi","kettle","gpload","vfs","filesystem-exception"],"backgroundTag":"invalid-url-format","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"}