{"record":{"id":"257da916f6850623","repo":"pentaho/pentaho-kettle","slug":"streamlookup-exception-conversionnotimplemented","errorCode":null,"errorMessage":"StreamLookup.Exception.ConversionNotImplemented","messagePattern":"StreamLookup\\.Exception\\.ConversionNotImplemented","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/streamlookup/StreamLookup.java","lineNumber":118,"sourceCode":"        case ValueMetaInterface.TYPE_BOOLEAN:\n          if ( \"TRUE\".equalsIgnoreCase( meta.getValueDefault()[i] )\n            || \"Y\".equalsIgnoreCase( meta.getValueDefault()[i] ) ) {\n            data.nullIf[i] = Boolean.TRUE;\n          } else {\n            data.nullIf[i] = Boolean.FALSE;\n          }\n          break;\n        case ValueMetaInterface.TYPE_BIGNUMBER:\n          try {\n            data.nullIf[i] = new BigDecimal( meta.getValueDefault()[i] );\n          } catch ( Exception e ) {\n            // Ignore errors\n          }\n          break;\n        default:\n          // if a default value is given and no conversion is implemented throw an error\n          if ( meta.getValueDefault()[i] != null && meta.getValueDefault()[i].trim().length() > 0 ) {\n            throw new RuntimeException( BaseMessages.getString(\n              PKG, \"StreamLookup.Exception.ConversionNotImplemented\" )\n              + \" \" + ValueMetaFactory.getValueMetaName( meta.getValueDefaultType()[i] ) );\n          } else {\n            // no default value given: just set it to null\n            data.nullIf[i] = null;\n            break;\n          }\n      }\n    }\n  }\n\n  private boolean readLookupValues() throws KettleException {\n    data.infoStream = meta.getStepIOMeta().getInfoStreams().get( 0 );\n    if ( data.infoStream.getStepMeta() == null ) {\n      logError( BaseMessages.getString( PKG, \"StreamLookup.Log.NoLookupStepSpecified\" ) );\n      return false;\n    }\n    if ( log.isDetailed() ) {","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/streamlookup/StreamLookup.java#L100-L136","documentation":"In StreamLookup's handleNullIf, when a lookup value's conversion is not implemented and a non-empty default value was configured, a RuntimeException is thrown with the localized 'ConversionNotImplemented' message plus the offending value type name. It protects against silently using a default whose value type the lookup cannot convert.","triggerScenarios":"Configuring a StreamLookup with a value default type (meta.getValueDefaultType()[i]) that has no conversion implementation (e.g. Binary or an unsupported type) while also specifying a non-empty default value string; the step then hits the default branch during processRow.","commonSituations":"Selecting an exotic default value type in the StreamLookup dialog; upgrading Kettle so a formerly tolerated type is now rejected; passing default values for lookup fields where the stream type cannot be converted (e.g. defaulting a Binary or Serializable field); copy-pasting metadata between steps with different field types.","solutions":["Remove the default value (leave it empty) so the step sets null instead of throwing, if a null is acceptable.","Change the value default type to a supported type (String, Integer, Number, Date, Boolean, BigNumber) that matches the lookup field.","Align the lookup field type in the source stream with the configured default type so no exotic conversion is needed.","Inspect meta.getValueDefaultType() entries in the transformation XML and fix any Binary/Serializable types.","Handle the conversion yourself in an earlier step (e.g. use a 'If field value is null' or Calculator step) instead of StreamLookup defaults."],"exampleFix":"// before (transformation XML: unsupported default type with a default value)\n<value_default>S</value_default>\n<value_default_type>8</value_default_type>\n// after (use a supported type or clear the default)\n<value_default></value_default>\n<value_default_type>2</value_default_type>","handlingStrategy":"validation","validationCode":"// Validate default value types before running StreamLookup\nfor ( int i = 0; i < meta.getValueDefaultType().length; i++ ) {\n  String def = meta.getValueDefault()[i];\n  int type = meta.getValueDefaultType()[i];\n  if ( def != null && def.trim().length() > 0\n       && ( type == ValueMetaInterface.TYPE_BINARY || type == ValueMetaInterface.TYPE_SERIALIZABLE ) ) {\n    throw new IllegalStateException( \"Unsupported default value type for lookup index \" + i );\n  }\n}","typeGuard":"boolean hasSupportedDefaultType( StreamLookupMeta meta, int i ) {\n  String def = meta.getValueDefault()[i];\n  int t = meta.getValueDefaultType()[i];\n  return def == null || def.trim().isEmpty()\n      || ( t != ValueMetaInterface.TYPE_BINARY && t != ValueMetaInterface.TYPE_SERIALIZABLE );\n}","tryCatchPattern":"try {\n  trans.execute( null );\n} catch ( RuntimeException e ) {\n  if ( e.getMessage() != null && e.getMessage().contains( \"Conversion not implemented\" ) ) {\n    log.error( \"StreamLookup default value type unsupported; fix step config\", e );\n  } else { throw e; }\n}","preventionTips":["Leave the default value empty when the default type cannot represent a string.","Use only String/Integer/Number/Date/Boolean/BigNumber as default value types.","Null the lookup field explicitly upstream instead of relying on StreamLookup defaults for exotic types.","After Pentaho upgrades, review StreamLookup configs whose field types changed."],"tags":["kettle","stream-lookup","type-conversion","configuration"],"backgroundTag":"method-not-implemented","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"}