{"record":{"id":"47735752c00b6839","repo":"pentaho/pentaho-kettle","slug":"jobftps-error-uuploadingfile","errorCode":"JobFTPS.Error.UuploadingFile","errorMessage":"JobFTPS.Error.UuploadingFile","messagePattern":"JobFTPS\\.Error\\.UuploadingFile","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/ftps/impl/src/main/java/org/pentaho/di/job/entries/ftpsget/FTPSConnection.java","lineNumber":471,"sourceCode":"\n  /**\n   *\n   * this method is used to upload a file to a remote host\n   *\n   * @param localFileName\n   *          Local full filename\n   * @param shortFileName\n   *          Filename in remote host\n   * @throws KettleException\n   */\n  public void uploadFile( String localFileName, String shortFileName ) throws KettleException {\n    FileObject file = null;\n\n    try {\n      file = KettleVFS.getInstance( bowl ).getFileObject( localFileName, nameSpace );\n      this.connection.uploadStream( file.getContent().getInputStream(), new FTPFile( new File( shortFileName ) ) );\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobFTPS.Error.UuploadingFile\", localFileName ), e );\n    } finally {\n      if ( file != null ) {\n        try {\n          file.close();\n        } catch ( Exception e ) {\n           //we do not able to close file will log it\n          logger.logDetailed( \"Unable to close file file\", e );\n        }\n      }\n    }\n  }\n\n  /**\n   *\n   * this method is used to return filenames in working directory\n   *\n   * @return filenames\n   * @throws KettleException","sourceCodeStart":453,"sourceCodeEnd":489,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/ftps/impl/src/main/java/org/pentaho/di/job/entries/ftpsget/FTPSConnection.java#L453-L489","documentation":"KettleException thrown by FTPSConnection.uploadFile when resolving the local file via KettleVFS or streaming it to the FTPS server via uploadStream fails. Message carries the local file name (note the typo 'UuploadingFile' in the message key).","triggerScenarios":"uploadFile(localFileName, shortFileName) when the local file does not exist or cannot be opened, getContent() fails, or the server rejects the STOR upload","commonSituations":"wrong local file path in job entry config; file locked by another process; remote directory lacks write permission; connection dropped before STOR","solutions":["Confirm the local file path exists and is readable before uploading","Check the remote working directory allows file creation for the FTPS user","Test the upload with a standalone FTPS client to get the raw server reply","Verify the connection is authenticated and in the correct transfer mode"],"exampleFix":"// before\nconnection.uploadFile(\"/tmp/report.csv\", \"report.csv\");\n// after\nFile f = new File(\"/tmp/report.csv\");\nif (!f.exists() || !f.canRead()) throw new IllegalArgumentException(\"local file missing/unreadable\");\nconnection.uploadFile(\"/tmp/report.csv\", \"report.csv\");","handlingStrategy":"validation","validationCode":"File f = new File(localFileName);\nif (!f.isFile() || !f.canRead())\n  throw new IllegalArgumentException(\"Local upload file missing or unreadable: \" + localFileName);","typeGuard":null,"tryCatchPattern":"try {\n  connection.uploadFile(localFileName, shortFileName);\n} catch (KettleException e) {\n  logError(\"Upload of \" + localFileName + \" failed: \" + e.getCause(), e);\n  throw e;\n}","preventionTips":["Validate the local path exists before uploading","Confirm remote directory write access for the FTPS user","Check remote quota/disk space on the server"],"tags":["ftps","file-upload","io"],"backgroundTag":"file-read-failed","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"}