pentaho/pentaho-kettle · error · CryptoException
SymmetricCrypto.SchemeMissing
SymmetricCrypto.SchemeMissing
Error message
SymmetricCrypto.SchemeMissing
What it means
The SymmetricCrypto(Meta) constructor throws CryptoException with message 'SymmetricCrypto.SchemeMissing' when meta.getDefaultScheme() returns null, i.e. no cipher transformation (e.g. AES) was configured on the SymmetricCryptoMeta. It cannot instantiate a JCE Cipher without a scheme.
Solutions
- Set the scheme on the meta before constructing: meta.setDefault() or set the algorithm field
- Verify the transformation step's 'Algorithm' property is populated in Spoon
- Check that the loaded metadata actually read the scheme (not lost in XML/repository load)
- Pass an explicit scheme via the SymmetricCrypto(meta, xform) constructor instead
Example fix
// before SymmetricCryptoMeta meta = new SymmetricCryptoMeta(); // scheme null SymmetricCrypto crypto = new SymmetricCrypto(meta); // after SymmetricCryptoMeta meta = new SymmetricCryptoMeta(); meta.setDefault(); // sets default scheme e.g. AES SymmetricCrypto crypto = new SymmetricCrypto(meta);
Defensive patterns
Strategy: validation
Validate before calling
if (meta == null || meta.getDefaultScheme() == null) {
throw new IllegalArgumentException("Scheme must be set on SymmetricCryptoMeta before construction");
} Type guard
boolean hasScheme(SymmetricCryptoMeta m) { return m != null && m.getDefaultScheme() != null; } Try / catch
try { crypto = new SymmetricCrypto(meta); } catch (CryptoException e) { log.error("Scheme missing/invalid: " + e.getMessage(), e); } Prevention
- Always call meta.setDefault() or set the scheme explicitly
- Null-check scheme values sourced from variables or fields
- Load metadata through loadXML/readRep so fields are populated
When it happens
Trigger: new SymmetricCrypto(symmetricCryptoMeta) where the meta was built without a scheme: defaultScheme null, plugin not initialized, or algorithm name not set in metadata.
Common situations: Building SymmetricCryptoMeta programmatically without calling setDefault()/setting the scheme; loading step metadata from a repository row where the algorithm field was empty; custom crypto plugin returning null default scheme.
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
- SecretKeyGenerator.KeyGenerationError
- SymmetricCrypto.SymmetricCrypto.Error.Cipher
- A connection of type PALO is expected
- A server socket allocation always has to accompanied by…
- AccessInput.Exception.CouldnotFindField
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/d2211c6e7c86501e.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/symmetriccrypto/symmetricalgorithm/SymmetricCrypto.java:59
private Cipher cipher;
private SecretKeySpec secretKeySpec;
/** Encryption/ decryption scheme **/
private String scheme;
/**
* Construct a new Symetric SymmetricCrypto trans
*
* @param inf
* The Database Connection Info to construct the connection with.
*/
public SymmetricCrypto( SymmetricCryptoMeta meta ) throws CryptoException {
this.meta = meta;
this.scheme = meta.getDefaultScheme();
try {
if ( this.scheme == null ) {
throw new CryptoException( BaseMessages.getString( PKG, "SymmetricCrypto.SchemeMissing" ) );
}
this.cipher = Cipher.getInstance( this.scheme );
} catch ( Exception e ) {
throw new CryptoException( e );
}
}
/**
* Construct a new Symetric SymmetricCrypto trans
*
* @param inf
* The Database Connection Info to construct the connection with.
*/
public SymmetricCrypto( SymmetricCryptoMeta meta, String xform ) throws CryptoException {
this.meta = meta;
this.scheme = Const.NVL( xform, meta.getDefaultScheme() );
try {
if ( this.scheme == null ) {View on GitHub (pinned to f3058517a1)