pentaho/pentaho-kettle · critical · RuntimeException

Error creating class for : + ic[i].getName()

Error message

Error creating class for : + ic[i].getName()

What it means

SymmetricCryptoMeta.getSymmetricCryptoInterfaces wraps reflection failures (Class.forName + newInstance) in a RuntimeException 'Error creating class for : <className>' when instantiating a registered algorithm plugin class fails during static registry initialization. Because it is static-init code, this typically blows up on first use of any symmetric crypto API.

Solutions

  1. Read the wrapped cause: ClassNotFoundException → deploy the plugin JAR; ExceptionInInitializerError → fix the class's own init failure
  2. Ensure all crypto plugin JARs are present in the Pentaho plugins/lib directory
  3. Verify each SymmetricCryptoInterface implementation has a public no-arg constructor
  4. Check for classloader conflicts when embedding Pentaho in another application

Example fix

// before: deploying without the provider dependency
// plugins/ contains custom crypto JAR but not BouncyCastle jar
// after: include the dependency
// plugins/lib/bcprov-jdk15on.jar alongside the crypto plugin JAR
Defensive patterns

Strategy: try-catch

Validate before calling

// force registry init early and report clearly
try {
  SymmetricCryptoMeta.getSymmetricCryptoInterfaces();
} catch (RuntimeException e) {
  throw new IllegalStateException("Crypto plugin registry failed to init", e);
}

Try / catch

try { interfaces = SymmetricCryptoMeta.getSymmetricCryptoInterfaces(); } catch (RuntimeException e) { log.error("Plugin class init failed: " + e.getCause(), e); }

Prevention

When it happens

Trigger: First call to getSymmetricCryptoInterfaces()/di() when a listed class (from a plugin discovery list 'ic') is absent from the classpath, throws in its constructor/static init, or lacks a public no-arg constructor.

Common situations: Plugin JAR removed or not deployed; duplicate/partial Kettle installation; plugin class fails in its own static initializer due to missing dependency (e.g. BouncyCastle absent); classloader conflicts in embedded usage.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/symmetriccrypto/symmetricalgorithm/SymmetricCryptoMeta.java:106

    }

    throw new CryptoException( BaseMessages.getString(
      PKG, "SymmetricCryptoMeta.CouldNotFoundAlgorithm", cryptograhname ) );
  }

  public static final synchronized SymmetricCryptoInterface[] getSymmetricCryptoInterfaces() {
    if ( allSymmetricCryptoInterface != null ) {
      return allSymmetricCryptoInterface;
    }

    Class<?>[] ic = SymmetricCryptoInterface.implementingClasses;
    allSymmetricCryptoInterface = new SymmetricCryptoInterface[ic.length];
    for ( int i = 0; i < ic.length; i++ ) {
      try {
        Class.forName( ic[i].getName() );
        allSymmetricCryptoInterface[i] = (SymmetricCryptoInterface) ic[i].newInstance();
      } catch ( Exception e ) {
        throw new RuntimeException( "Error creating class for : " + ic[i].getName(), e );
      }
    }
    return allSymmetricCryptoInterface;
  }

  public String getAlgorithm() {
    return cryptographyInterface.getAlgorithm();
  }

  public int getAlgorithmType() {
    return cryptographyInterface.getAlgorithmType();
  }

  public String getDefaultScheme() {
    return cryptographyInterface.getDefaultScheme();
  }

  public static int getAlgorithmTypeFromCode( String code ) {

View on GitHub (pinned to f3058517a1)