pentaho/pentaho-kettle · error · CryptoException

SymmetricCryptoMeta.CouldNotFoundAlgorithm

SymmetricCryptoMeta.CouldNotFoundAlgorithm

Error message

SymmetricCryptoMeta.CouldNotFoundAlgorithm

What it means

SymmetricCryptoMeta.findSymmetricCryptoInterface throws CryptoException 'SymmetricCryptoMeta.CouldNotFoundAlgorithm' when no registered SymmetricCryptoInterface's getAlgorithm() matches the given name (case-insensitive). The static registry contains only the built-in algorithm plugins found at class init.

Solutions

  1. Use one of the registered algorithms — list them via SymmetricCryptoMeta.getSymmetricCryptoInterfaces() and check getAlgorithm() values
  2. Trim the algorithm name and retry; stray whitespace breaks equalsIgnoreCase
  3. Add the custom algorithm plugin JAR to the classpath (lib/ or plugins dir)
  4. Upgrade Pentaho if the algorithm was added in a newer version

Example fix

// before
SymmetricCryptoInterface i = SymmetricCryptoMeta.getSymmetricCryptoInterface("Camellia");
// after
SymmetricCryptoInterface i = SymmetricCryptoMeta.getSymmetricCryptoInterface("AES");
Defensive patterns

Strategy: type-guard

Validate before calling

boolean supported = java.util.Arrays.stream(SymmetricCryptoMeta.getSymmetricCryptoInterfaces())
  .anyMatch(i -> i.getAlgorithm().equalsIgnoreCase(name.trim()));

Type guard

SymmetricCryptoInterface find(String name) {
  for (SymmetricCryptoInterface i : SymmetricCryptoMeta.getSymmetricCryptoInterfaces()) {
    if (i.getAlgorithm().equalsIgnoreCase(name.trim())) return i;
  }
  return null;
}

Try / catch

try { iface = SymmetricCryptoMeta.getSymmetricCryptoInterface(name); } catch (CryptoException e) { log.error("Unknown algorithm " + name, e); }

Prevention

When it happens

Trigger: getSymmetricCryptoInterface(name) called with an algorithm name that no registered interface declares — e.g. 'Camellia' when only AES/DES/Twofish/etc. are registered, or a name differing from the plugin's declared algorithm string.

Common situations: Transformation metadata references an algorithm not present in this Kettle version; custom crypto plugin JAR missing from the classpath; scheme string saved with different spelling/whitespace than the plugin's algorithm name.

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/0dc9a38a46c735b1. Report an issue: GitHub.

Appendix: source

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

  /**
   * Search for the right type of DatabaseInterface object and return it.
   *
   * @param databaseType
   *          the type of DatabaseInterface to look for (description)
   * @return The requested DatabaseInterface
   *
   * @throws CryptoException
   *           when the type could not be found or referenced.
   */
  private static final synchronized SymmetricCryptoInterface findSymmetricCryptoInterface( String cryptograhname ) throws CryptoException {
    SymmetricCryptoInterface[] di = getSymmetricCryptoInterfaces();
    for ( int i = 0; i < di.length; i++ ) {
      if ( di[i].getAlgorithm().equalsIgnoreCase( cryptograhname ) ) {
        return di[i];
      }
    }

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

View on GitHub (pinned to f3058517a1)