{"record":{"id":"0526bbbc9eacfd4d","repo":"pentaho/pentaho-kettle","slug":"ifnull-log-cannotfindvaluetype","errorCode":null,"errorMessage":"IfNull.Log.CanNotFindValueType","messagePattern":"IfNull\\.Log\\.CanNotFindValueType","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/ifnull/IfNull.java","lineNumber":118,"sourceCode":"        }\n      } else if ( meta.isSelectValuesType() ) {\n        // Consider only select value types\n        if ( meta.getValueTypes() != null && meta.getValueTypes().length > 0 ) {\n          // return the real default values\n          int typeLength = meta.getValueTypes().length;\n          data.defaultValues = new String[typeLength];\n          data.defaultMasks = new String[typeLength];\n          data.setEmptyString = new boolean[typeLength];\n\n          // return all type codes\n          HashSet<String> AlllistTypes = new HashSet<String>();\n          for ( int i = 0; i < ValueMetaInterface.typeCodes.length; i++ ) {\n            AlllistTypes.add( ValueMetaInterface.typeCodes[i] );\n          }\n\n          for ( int i = 0; i < meta.getValueTypes().length; i++ ) {\n            if ( !AlllistTypes.contains( meta.getValueTypes()[i].getTypeName() ) ) {\n              throw new KettleException( BaseMessages.getString( PKG, \"IfNull.Log.CanNotFindValueType\", meta\n                  .getValueTypes()[i].getTypeName() ) );\n            }\n\n            data.ListTypes.put( meta.getValueTypes()[i].getTypeName(), i );\n            data.defaultValues[i] = environmentSubstitute( meta.getValueTypes()[i].getTypereplaceValue() );\n            data.defaultMasks[i] = environmentSubstitute( meta.getValueTypes()[i].getTypereplaceMask() );\n            data.setEmptyString[i] = meta.getValueTypes()[i].isSetTypeEmptyString();\n          }\n\n          HashSet<Integer> fieldsSelectedIndex = new HashSet<Integer>();\n          for ( int i = 0; i < data.outputRowMeta.size(); i++ ) {\n            ValueMetaInterface fieldMeta = data.outputRowMeta.getValueMeta( i );\n            if ( data.ListTypes.containsKey( fieldMeta.getTypeDesc() ) ) {\n              fieldsSelectedIndex.add( i );\n            }\n          }\n          data.fieldnrs = new int[fieldsSelectedIndex.size()];\n          List<Integer> entries = new ArrayList<Integer>( fieldsSelectedIndex );","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/ifnull/IfNull.java#L100-L136","documentation":"In 'value types' mode, the If Null step validates each configured value type name against ValueMetaInterface.typeCodes. If a configured type name is not one of the known Kettle value types, processRow() throws this KettleException naming the unknown type.","triggerScenarios":"processRow with isSelectValuesType() true and meta.getValueTypes()[i].getTypeName() not present in ValueMetaInterface.typeCodes — an unrecognized type name string was configured.","commonSituations":"Typo in a value type name (e.g. \"int\" instead of \"Integer\"); repository entry edited by hand or by an older plugin version; config written in a different locale or by external tooling.","solutions":["Correct the value type name in the If Null dialog to a valid Kettle type (String, Integer, Number, Date, Boolean, etc.)","Re-create the value type entry via the dialog instead of hand-editing the XML/repo record","Check for version mismatch between the tool that wrote the config and the current Kettle version"],"exampleFix":"// before\nvalueTypes: [ { typeName: \"int\", replaceValue: \"0\" } ]\n// after\nvalueTypes: [ { typeName: \"Integer\", replaceValue: \"0\" } ]","handlingStrategy":"validation","validationCode":"List<String> valid = Arrays.asList(ValueMetaInterface.typeCodes);\nfor (IfNullValueType vt : meta.getValueTypes()) { if (!valid.contains(vt.getTypeName())) throw new IllegalStateException(\"Bad type: \" + vt.getTypeName()); }","typeGuard":"boolean isValidType(String name) { return Arrays.asList(ValueMetaInterface.typeCodes).contains(name); }","tryCatchPattern":"try { trans.execute(null); } catch (KettleException e) { if (e.getMessage().contains(\"CanNotFindValueType\")) { fixTypeName(); } else { throw e; } }","preventionTips":["Select value types from the dropdown, never free-text","Use ValueMetaFactory constants when coding step config","Validate configured type names before execution"],"tags":["kettle","transformation","value-type"],"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"}