pentaho/pentaho-kettle · error · KettleException

No compression provider found with name =

Error message

No compression provider found with name = {compressionType}

What it means

TextFileOutput resolves its configured file compression type via CompressionProviderFactory.getCompressionProviderByName. When no registered provider matches the configured name (after defaulting to 'None' via Const.NVL), getCompressionProvider throws this KettleException. The compression plugin is missing or the name is misspelled.

Solutions

  1. Set the compression field to a registered provider name ('None', 'Zip', 'GZip', 'Hadoop-Snappy', etc.)
  2. Deploy the missing compression plugin jar into the plugins directory and restart PDI
  3. Log the available provider names from CompressionProviderFactory to see what is installed
  4. Check that the ktr XML compression attribute matches the exact provider name

Example fix

// before
meta.setFileCompression( "gzip" ); // wrong case, no provider registered
// after
meta.setFileCompression( "GZip" ); // matches registered provider name
Defensive patterns

Strategy: validation

Validate before calling

String type = Const.NVL( meta.getFileCompression(), "None" );
CompressionProvider p = CompressionProviderFactory.getInstance().getCompressionProviderByName( type );
if ( p == null ) {
  throw new IllegalArgumentException( "Unknown compression provider: " + type );
}

Try / catch

try {
  CompressionProvider p = getCompressionProvider();
} catch ( KettleException e ) {
  logError( e.getMessage() + " — available: " + CompressionProviderFactory.getInstance().getCompressionProviderNames(), e );
  throw e;
}

Prevention

When it happens

Trigger: getCompressionProvider -> compressionProvider call path with meta.getFileCompression() set to a name that no provider registers (typo like 'ZIp', or the compression plugin jar is absent from the classpath/plugins directory).

Common situations: Migrating transformations between installs where optional compression plugins (e.g. Hadoop Snappy/BZip2 variants) are not installed; hand-editing the ktr XML and mistyping the compression attribute; plugin not deployed on a Carte/agent node.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/textfileoutput/TextFileOutput.java:102

      }
    }
  }

  public boolean isFileExists( String filename ) throws KettleException {
    try {
      return getFileObject( filename, getTransMeta() ).exists();
    } catch ( Exception e ) {
      throw new KettleException( "Error opening new file : " + e.toString() );
    }
  }

  private CompressionProvider getCompressionProvider() throws KettleException {
    String compressionType = Const.NVL( meta.getFileCompression(), FILE_COMPRESSION_TYPE_NONE );

    CompressionProvider compressionProvider = CompressionProviderFactory.getInstance().getCompressionProviderByName( compressionType );

    if ( compressionProvider == null ) {
      throw new KettleException( "No compression provider found with name = " + compressionType );
    }

    if ( !compressionProvider.supportsOutput() ) {
      throw new KettleException( "Compression provider " + compressionType + " does not support output streams!" );
    }
    return compressionProvider;
  }

  private void initServletStreamWriter(  ) throws KettleException {
    data.writer = null;
    try {
      Writer writer = getTrans().getServletPrintWriter();
      if ( Utils.isEmpty( meta.getEncoding( ) ) ) {
        data.writer = new WriterOutputStream( writer );
      } else {
        data.writer = new WriterOutputStream( writer, meta.getEncoding( ) );
      }
    } catch ( Exception e ) {

View on GitHub (pinned to f3058517a1)