{"record":{"id":"73377a584d67df3d","repo":"pentaho/pentaho-kettle","slug":"checksum-error-digest","errorCode":"CheckSum.Error.Digest","errorMessage":"CheckSum.Error.Digest","messagePattern":"CheckSum\\.Error\\.Digest","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/checksum/CheckSum.java","lineNumber":195,"sourceCode":"        case CheckSumMeta.TYPE_SHA256:\n          data.checksumCalculator =\n              new DigestChecksumCalculator( MessageDigest.getInstance( meta.getCheckSumType() ) );\n          break;\n        case CheckSumMeta.TYPE_ADLER32:\n          data.checksumCalculator = new ChecksumChecksumCalculator( new Adler32() );\n          break;\n        case CheckSumMeta.TYPE_CRC32:\n          data.checksumCalculator = new ChecksumChecksumCalculator( new CRC32() );\n          break;\n        default:\n          throw new KettleException(\n          BaseMessages.getString( PKG, \"CheckSum.Error.UnknownChecksumType\", meta.getCheckSumType() ) );\n      }\n    } catch ( KettleException e ) {\n      // Rethrow it\n      throw e;\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"CheckSum.Error.Digest\" ), e );\n    }\n  }\n\n  private void initializeFieldConverters( RowMetaInterface inputRowMeta, int[] fieldIndexMapping ) throws KettleException {\n    data.fieldConverters = new FieldToBytesConverter[ fieldIndexMapping.length ];\n    for ( int i = 0; i < fieldIndexMapping.length; i++ ) {\n      switch ( meta.getEvaluationMethod() ) {\n        case CheckSumMeta.EVALUATION_METHOD_BYTES:\n          data.fieldConverters[ i ] = new BytesToBytesConverter( inputRowMeta, fieldIndexMapping[ i ] );\n          break;\n        case CheckSumMeta.EVALUATION_METHOD_PENTAHO_STRINGS:\n          data.fieldConverters[ i ] = new PentahoStringsToBytesConverter( inputRowMeta, fieldIndexMapping[ i ] );\n          break;\n        case CheckSumMeta.EVALUATION_METHOD_NATIVE_STRINGS:\n          data.fieldConverters[ i ] = new NativeStringsToBytesConverter( inputRowMeta, fieldIndexMapping[ i ] );\n          break;\n        default:\n          throw new KettleException(","sourceCodeStart":177,"sourceCodeEnd":213,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/checksum/CheckSum.java#L177-L213","documentation":"CheckSum step wraps any unexpected failure while initializing the message digest / checksum calculator into a KettleException with key 'CheckSum.Error.Digest'. It is a catch-all around checksum-type resolution and MessageDigest.getInstance/initialization, so any unrecognized algorithm or provider failure surfaces here.","triggerScenarios":"processRow -> initializeChecksumCalculator called with meta.getCheckSumType() naming a checksum algorithm for which MessageDigest/Checksum instantiation throws (e.g. unsupported or misspelled algorithm, security provider unavailable, KettleException rethrown).","commonSituations":"Typing an algorithm name like 'SHA256' when the JVM only offers 'SHA-256'; running on a stripped JRE without the needed crypto provider; corrupted transformation metadata passing a null/invalid checksum type.","solutions":["Use the exact JDK algorithm name (e.g. 'MD5', 'SHA-1', 'SHA-256') in the CheckSum step's checksum type","Check java.security providers (Security.getProviders()) on the runtime JVM; add BouncyCastle or the missing provider if the algorithm is absent","Re-open the transformation and re-select the checksum type from the dropdown so meta stores a valid value","Read the chained cause ('cause by') of the KettleException for the underlying digest error"],"exampleFix":"// before\nchecksumType = \"SHA256\";\n// after\nchecksumType = \"SHA-256\";","handlingStrategy":"validation","validationCode":"String type = meta.getCheckSumType();\ntry {\n  javax.crypto.Mac.getInstance(type); // or MessageDigest.getInstance for digest types\n} catch (java.security.NoSuchAlgorithmException e) {\n  throw new IllegalArgumentException(\"Unsupported checksum type: \" + type);\n}","typeGuard":null,"tryCatchPattern":"try { step.processRow(); } catch (KettleException e) { if (e.getMessage().contains(\"CheckSum.Error.Digest\")) { /* fix algorithm name/provider */ } throw e; }","preventionTips":["Use exact JDK algorithm names (SHA-256, not SHA256)","Preview the step in Spoon before running the full transformation","Log Security.getProviders() when deploying to a new JVM","Never hand-edit checksum-type values in .ktr XML"],"tags":["kettle","checksum","crypto"],"backgroundTag":"checksum-mismatch","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}