{"record":{"id":"6e0fcc88ec21ac97","repo":"pentaho/pentaho-kettle","slug":"checksum-error-unknownevaluationmethod","errorCode":null,"errorMessage":"CheckSum.Error.UnknownEvaluationMethod","messagePattern":"CheckSum\\.Error\\.UnknownEvaluationMethod","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/checksum/CheckSum.java","lineNumber":213,"sourceCode":"      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(\n            BaseMessages.getString( PKG, \"CheckSum.Error.UnknownEvaluationMethod\", meta.getEvaluationMethod() ) );\n      }\n    }\n  }\n\n  private static String getStringFromBytes( byte[] bytes ) {\n    StringBuilder sb = new StringBuilder();\n    for ( int i = 0; i < bytes.length; i++ ) {\n      byte b = bytes[i];\n      sb.append( 0x00FF & b );\n      if ( i + 1 < bytes.length ) {\n        sb.append( \"-\" );\n      }\n    }\n    return sb.toString();\n  }\n\n  public String byteToHexEncode_compatible( byte[] in ) {","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/checksum/CheckSum.java#L195-L231","documentation":"initializeFieldConverters throws this when meta.getEvaluationMethod() is not one of the known CheckSumMeta evaluation methods (result field string / native string conversion). The switch falls through to default and wraps the unknown value in a KettleException.","triggerScenarios":"processRow -> initializeFieldConverters where meta.getEvaluationMethod() returns a value outside CheckSumMeta.EVALUATION_METHOD_* constants, typically from hand-edited or version-mismatched transformation XML/repository metadata.","commonSituations":"Editing the .ktr XML and typing an evaluation-method string manually; loading a transformation produced by a newer/older plugin version with a renamed constant; programmatic step-meta construction with a wrong int/string value.","solutions":["Open the CheckSum step dialog and re-select the 'result field' type (string vs compatible) so the evaluation method is set to a valid constant","Inspect the stored metadata value of evaluation method and map it to a CheckSumMeta.EVALUATION_METHOD_* constant","Use CheckSumMeta constants (not raw literals) when building StepMeta in code","Check plugin/core version consistency between the repository metadata and the running Pentaho version"],"exampleFix":"// before\nmeta.setEvaluationMethod(\"native\");\n// after\nmeta.setEvaluationMethod(CheckSumMeta.EVALUATION_METHOD_NATIVE_STRINGS);","handlingStrategy":"validation","validationCode":"int m = meta.getEvaluationMethod();\nif (m != CheckSumMeta.EVALUATION_METHOD_FIELD && m != CheckSumMeta.EVALUATION_METHOD_NATIVE_STRINGS) {\n  throw new IllegalArgumentException(\"Unknown evaluation method: \" + m);\n}","typeGuard":null,"tryCatchPattern":"catch (KettleException e) { if (e.getMessage().contains(\"UnknownEvaluationMethod\")) { reset step meta to defaults; } }","preventionTips":["Build metadata with CheckSumMeta constants, not literals","Avoid editing .ktr XML by hand","Keep Pentaho client and server/plugin versions aligned"],"tags":["kettle","checksum","metadata"],"backgroundTag":"invalid-enum-value","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"}