{"record":{"id":"c5b08728684c0712","repo":"pentaho/pentaho-kettle","slug":"reference-key-0-reference-value-1-is-not-equal-to-2","errorCode":null,"errorMessage":"Reference key '{0}': reference value '{1}' is not equal to '{2}'","messagePattern":"Reference key '(.+?)': reference value '(.+?)' is not equal to '(.+?)'","errorType":"validation","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/step/StepInjectionUtil.java","lineNumber":113,"sourceCode":"    for ( int i = 0; i < refEntries.size(); i++ ) {\n      StepInjectionMetaEntry refEntry = refEntries.get( i );\n      StepInjectionMetaEntry cmpEntry = cmpEntries.get( i );\n      if ( cmpEntry.getValueType() == ValueMetaInteger.TYPE_NONE ) {\n        compareEntryValues( refEntry.getDetails(), cmpEntry.getDetails() );\n      } else {\n        Object ref = refEntry.getValue();\n        Object cmp = cmpEntry.getValue();\n        if ( ref != null && cmp == null ) {\n          throw new KettleException( \"Reference key '\" + refEntry.getKey()\n            + \"': value is not null while the compare value is null\" );\n        }\n        if ( ref == null && cmp != null ) {\n          throw new KettleException( \"Reference key '\" + refEntry.getKey()\n            + \"': value is null while the compare value is not null\" );\n        }\n        if ( ref != null && cmp != null ) {\n          if ( !ref.equals( cmp ) ) {\n            throw new KettleException( \"Reference key '\" + refEntry.getKey()\n              + \"': reference value '\" + ref + \"' is not equal to '\" + cmp + \"'\" );\n          }\n        }\n      }\n    }\n  }\n}\n","sourceCodeStart":95,"sourceCodeEnd":121,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/step/StepInjectionUtil.java#L95-L121","documentation":"StepInjectionUtil.compareEntryValues throws this when both reference and compare values are non-null but not equal (per Object.equals). The message includes the entry key and both values so the exact divergent field can be identified.","triggerScenarios":"compareEntryValues on leaf entries where refEntry.getValue() != null, cmpEntry.getValue() != null, and !ref.equals(cmp) — e.g. different filenames, row limits, or field mappings between the two metadata sets.","commonSituations":"Regression testing step metadata after code changes: a transformation's saved setting differs from the golden reference; or two environments were configured with different values (dev vs prod paths, ports, table names).","solutions":["Read the key and both values from the message and align the compared transformation's setting with the reference (or vice versa).","Regenerate the reference snapshot if the new value is the intended baseline.","Check for environment-specific values (paths, hostnames) and parameterize them before comparison."],"exampleFix":"// before\nmeta.setRowLimit(\"100\"); // reference says 0\n// after\nmeta.setRowLimit(\"0\");","handlingStrategy":"try-catch","validationCode":"// Pre-compare leaf values to collect all mismatches up front\nfor (int i = 0; i < refEntries.size(); i++) {\n  Object r = refEntries.get(i).getValue(), c = cmpEntries.get(i).getValue();\n  if (r != null && c != null && !r.equals(c)) { mismatches.add(refEntries.get(i).getKey() + \": \" + r + \" != \" + c); }\n}","typeGuard":null,"tryCatchPattern":"try { StepInjectionUtil.compareEntryValues(ref, cmp); } catch (KettleException e) { if (e.getMessage().contains(\"is not equal to\")) { log.error(\"Metadata value divergence: \" + e.getMessage()); } else { throw e; } }","preventionTips":["Parameterize environment-specific values (paths, hosts) before comparing","Treat the message's key and values as the exact fields to align","Keep a single authoritative reference snapshot per plugin version"],"tags":["kettle","metadata-injection","comparison","value-mismatch"],"backgroundTag":"invalid-argument-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"}