pentaho/pentaho-kettle · error · KettleException

GPG.ErrorCheckingGPGFile

Error message

GPG.ErrorCheckingGPGFile

What it means

Thrown by the GPG constructor when any exception occurs while resolving or validating the GPG executable via VFS (e.g. a FileSystemException opening the file, access problems, or VFS scheme errors). It wraps the original exception with the configured gpg filename for diagnosis.

Solutions

  1. Read the wrapped cause (getCause()) to see the actual VFS/IO error and fix the path accordingly.
  2. Use a plain absolute local filesystem path for the GPG executable to avoid VFS scheme issues.
  3. Check OS permissions on every directory component of the path.
  4. Ensure the Kettle VFS plugin/provider for the chosen scheme is installed.

Example fix

// before
String gpgPath = "sftp://host/usr/bin/gpg"; // remote scheme breaks VFS resolution
// after
String gpgPath = "/usr/bin/gpg"; // plain local path
GPG gpg = new GPG( bowl, gpgPath, log );
Defensive patterns

Strategy: try-catch

Validate before calling

// use a plain local path and check readability before construction
java.io.File f = new java.io.File( gpgPath );
if ( !f.canRead() ) throw new IllegalArgumentException( "Cannot read GPG path: " + gpgPath );

Try / catch

try {
  GPG gpg = new GPG( bowl, gpgPath, log );
} catch ( KettleException e ) {
  logError( "GPG executable validation failed for " + gpgPath + ": " + e.getCause(), e );
}

Prevention

When it happens

Trigger: Inside the GPG constructor's try block, KettleVFS.getInstance(bowl).getFileObject(getGpgExeFile()), file.exists(), file.getType(), or KettleVFS.getFilename(file) throws any Exception — bad VFS URI, permission issues on the path, or provider failure.

Common situations: Malformed VFS URI in the gpg path (e.g. stray spaces, unsupported scheme); OS permission denied traversing to the binary; VFS provider missing for the configured scheme; transient filesystem errors on network mounts.

Understand the failure class

Background: "open() failed", "failed to open file", "cannot create file" — what a file open error means and how to fix it — this error's family across 42 libraries.

Related errors


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

Appendix: source

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

    // 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 );

    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG, "GPG.ErrorCheckingGPGFile", getGpgExeFile() ), e );
    } finally {
      try {
        if ( file != null ) {
          file.close();
        }
      } catch ( Exception e ) {
        // Ignore close errors
      }
    }
  }

  /**
   * Returns GPG program location
   *
   * @return GPG filename
   */
  public String getGpgExeFile() {
    return this.gpgexe;

View on GitHub (pinned to f3058517a1)