{"record":{"id":"f98c7a9ac31e5fa4","repo":"pentaho/pentaho-kettle","slug":"reference-key-0-value-is-not-null-while-the-compare-value-is","errorCode":null,"errorMessage":"Reference key '{0}': value is not null while the compare value is null","messagePattern":"Reference key '(.+?)': value is not null while the compare value is null","errorType":"validation","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/step/StepInjectionUtil.java","lineNumber":104,"sourceCode":"   */\n  public static void compareEntryValues( List<StepInjectionMetaEntry> refEntries,\n    List<StepInjectionMetaEntry> cmpEntries ) throws KettleException {\n\n    if ( refEntries.size() != cmpEntries.size() ) {\n      throw new KettleException( \"The number of reference entries (\" + refEntries.size()\n        + \") is not the same as the number of compare entries(\" + cmpEntries.size() + \")\" );\n    }\n\n    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":86,"sourceCodeEnd":121,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/step/StepInjectionUtil.java#L86-L121","documentation":"StepInjectionUtil.compareEntryValues throws this when a leaf entry in the reference metadata has a non-null value but the corresponding compare entry's value is null, i.e. the compared transformation is missing a value that the reference defines.","triggerScenarios":"compareEntryValues on leaf entries (valueType != TYPE_NONE) where refEntry.getValue() != null but cmpEntry.getValue() == null for the same key.","commonSituations":"A field in the reference transformation (e.g. a step setting or injected field mapping) was left unset in the transformation being compared, or a value was dropped during save/load round-trip.","solutions":["Populate the missing value in the compared transformation for the key named in the message.","Check whether the compare side's step defaults differ from the reference side's saved values.","Re-export the reference entries after confirming both metas were built with the same plugin version."],"exampleFix":"// before\nmeta.setFilename(null); // value dropped\n// after\nmeta.setFilename(\"/data/input.csv\");","handlingStrategy":"validation","validationCode":"// Pre-check for null compare values on leaves\nfor (int i = 0; i < refEntries.size(); i++) {\n  StepInjectionMetaEntry r = refEntries.get(i), c = cmpEntries.get(i);\n  if (c.getValueType() != ValueMetaInterface.TYPE_NONE && r.getValue() != null && c.getValue() == null) {\n    log.warn(\"Missing compare value for key \" + r.getKey());\n  }\n}","typeGuard":null,"tryCatchPattern":"try { StepInjectionUtil.compareEntryValues(ref, cmp); } catch (KettleException e) { if (e.getMessage().contains(\"value is not null while the compare value is null\")) { log.error(\"Compared transformation missing a value: \" + e.getMessage()); } else { throw e; } }","preventionTips":["Fill in all step settings in the compared transformation before diffing","Round-trip both metas through save/load to normalize defaults","Keep reference snapshots generated by the same plugin build"],"tags":["kettle","metadata-injection","comparison","null-value"],"backgroundTag":"unexpected-response-shape","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"}