pentaho/pentaho-kettle · error · KettleException

GPG.GPGFilenameMissing

Error message

GPG.GPGFilenameMissing

What it means

Thrown by the GPG constructor when the configured gpg executable filename is empty or null. The GPG helper refuses to operate without a path to the GnuPG binary, failing fast before attempting any process execution.

Solutions

  1. Set the GnuPG executable location (e.g. /usr/bin/gpg or C:\Program Files\GnuPG\bin\gpg.exe) in the job entry settings.
  2. Verify the Kettle/environment variable used for the path resolves to a non-empty value at runtime.
  3. Install GnuPG if it is not present, then configure the path.

Example fix

// before
GPG gpg = new GPG( bowl, "", log ); // empty path
// after
String gpgPath = "/usr/bin/gpg"; // or resolve from settings/variable
if ( gpgPath != null && !gpgPath.isEmpty() ) {
  GPG gpg = new GPG( bowl, gpgPath, log );
}
Defensive patterns

Strategy: validation

Validate before calling

String gpgPath = resolveGpgPath(); // from settings/variable
if ( gpgPath == null || gpgPath.trim().isEmpty() ) {
  throw new IllegalArgumentException( "GPG executable path must be configured" );
}

Type guard

boolean gpgPathPresent( String p ) { return p != null && !p.trim().isEmpty(); }

Try / catch

try {
  GPG gpg = new GPG( bowl, gpgPath, log );
} catch ( KettleException e ) {
  if ( e.getMessage().contains( "GPGFilenameMissing" ) ) {
    logError( "Configure the GnuPG executable path in the job entry settings" );
  }
}

Prevention

When it happens

Trigger: new GPG(bowl, gpgFilename, log) is called with an empty string or null gpgFilename — Utils.isEmpty(getGpgExeFile()) is true. Typically when JobEntryPGPEncryptFiles' 'GnuPG home / executable' setting was never filled in.

Common situations: Fresh job entry where the GPG executable field was left blank; environment variable or Kettle variable holding the path resolved to empty; config copied between environments where the path setting was lost.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/job/entries/pgpencryptfiles/GPG.java:115

    }
  }

  /**
   * Constructs a new GnuPG
   *
   * @param gpgFilename
   *          gpg program location
   * @param logInterface
   *          LogChannelInterface
   * @throws KettleException
   */
  public GPG( Bowl bowl, String gpgFilename, LogChannelInterface logInterface ) throws KettleException {
    this.log = logInterface;
    this.gpgexe = gpgFilename;
    // Let's check GPG filename
    if ( Utils.isEmpty( getGpgExeFile() ) ) {
      // No filename specified
      throw new KettleException( BaseMessages.getString( PKG, "GPG.GPGFilenameMissing" ) );
    }
    // We have a filename, we need to check
    FileObject file = null;
    try {
      file = KettleVFS.getInstance( bowl ).getFileObject( getGpgExeFile() );

      if ( !file.exists() ) {
        throw new KettleException( BaseMessages.getString( PKG, "GPG.GPGFilenameNotFound" ) );
      }
      // The file exists
      if ( !file.getType().equals( FileType.FILE ) ) {
        throw new KettleException( BaseMessages.getString( PKG, "GPG.GPGNotAFile", getGpgExeFile() ) );
      }

      // Ok we have a real file
      // Get the local filename
      this.gpgexe = KettleVFS.getFilename( file );

View on GitHub (pinned to f3058517a1)