pentaho/pentaho-kettle · error · KettleException

JobFTPS.Error.UuploadingFile

JobFTPS.Error.UuploadingFile

Error message

JobFTPS.Error.UuploadingFile

What it means

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).

Solutions

  1. Confirm the local file path exists and is readable before uploading
  2. Check the remote working directory allows file creation for the FTPS user
  3. Test the upload with a standalone FTPS client to get the raw server reply
  4. Verify the connection is authenticated and in the correct transfer mode

Example fix

// before
connection.uploadFile("/tmp/report.csv", "report.csv");
// after
File f = new File("/tmp/report.csv");
if (!f.exists() || !f.canRead()) throw new IllegalArgumentException("local file missing/unreadable");
connection.uploadFile("/tmp/report.csv", "report.csv");
Defensive patterns

Strategy: validation

Validate before calling

File f = new File(localFileName);
if (!f.isFile() || !f.canRead())
  throw new IllegalArgumentException("Local upload file missing or unreadable: " + localFileName);

Try / catch

try {
  connection.uploadFile(localFileName, shortFileName);
} catch (KettleException e) {
  logError("Upload of " + localFileName + " failed: " + e.getCause(), e);
  throw e;
}

Prevention

When it happens

Trigger: uploadFile(localFileName, shortFileName) when the local file does not exist or cannot be opened, getContent() fails, or the server rejects the STOR upload

Common situations: wrong local file path in job entry config; file locked by another process; remote directory lacks write permission; connection dropped before STOR

Understand the failure class

Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/47735752c00b6839. Report an issue: GitHub.

Appendix: source

Thrown at plugins/ftps/impl/src/main/java/org/pentaho/di/job/entries/ftpsget/FTPSConnection.java:471

  /**
   *
   * this method is used to upload a file to a remote host
   *
   * @param localFileName
   *          Local full filename
   * @param shortFileName
   *          Filename in remote host
   * @throws KettleException
   */
  public void uploadFile( String localFileName, String shortFileName ) throws KettleException {
    FileObject file = null;

    try {
      file = KettleVFS.getInstance( bowl ).getFileObject( localFileName, nameSpace );
      this.connection.uploadStream( file.getContent().getInputStream(), new FTPFile( new File( shortFileName ) ) );
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG, "JobFTPS.Error.UuploadingFile", localFileName ), e );
    } finally {
      if ( file != null ) {
        try {
          file.close();
        } catch ( Exception e ) {
           //we do not able to close file will log it
          logger.logDetailed( "Unable to close file file", e );
        }
      }
    }
  }

  /**
   *
   * this method is used to return filenames in working directory
   *
   * @return filenames
   * @throws KettleException

View on GitHub (pinned to f3058517a1)