{"record":{"id":"cfd6bcdef70e9611","repo":"pentaho/pentaho-kettle","slug":"streamlookupmeta-exception","errorCode":null,"errorMessage":"StreamLookupMeta.Exception.UnexpecteErrorReadingStepInfoFromRepository","messagePattern":"StreamLookupMeta\\.Exception\\.UnexpecteErrorReadingStepInfoFromRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/streamlookup/StreamLookupMeta.java","lineNumber":308,"sourceCode":"\n      for ( int i = 0; i < nrkeys; i++ ) {\n        // CHECKSTYLE:Indentation:OFF\n        getKeystream()[i] = rep.getStepAttributeString( id_step, i, \"lookup_key_name\" );\n        getKeylookup()[i] = rep.getStepAttributeString( id_step, i, \"lookup_key_field\" );\n        // CHECKSTYLE:Indentation:ON\n      }\n\n      for ( int i = 0; i < nrvalues; i++ ) {\n        // CHECKSTYLE:Indentation:OFF\n        getValue()[i] = rep.getStepAttributeString( id_step, i, \"return_value_name\" );\n        getValueName()[i] = rep.getStepAttributeString( id_step, i, \"return_value_rename\" );\n        getValueDefault()[i] = rep.getStepAttributeString( id_step, i, \"return_value_default\" );\n        getValueDefaultType()[i] =\n          ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( id_step, i, \"return_value_type\" ) );\n        // CHECKSTYLE:Indentation:ON\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"StreamLookupMeta.Exception.UnexpecteErrorReadingStepInfoFromRepository\" ), e );\n    }\n  }\n\n  @Override\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {\n    try {\n      StreamInterface infoStream = getStepIOMeta().getInfoStreams().get( 0 );\n      rep.saveStepAttribute( id_transformation, id_step, \"lookup_from_step\", infoStream.getStepname() );\n      rep.saveStepAttribute( id_transformation, id_step, \"input_sorted\", isInputSorted() );\n      rep.saveStepAttribute( id_transformation, id_step, \"preserve_memory\", isMemoryPreservationActive() );\n      rep.saveStepAttribute( id_transformation, id_step, \"sorted_list\", isUsingSortedList() );\n      rep.saveStepAttribute( id_transformation, id_step, \"integer_pair\", isUsingIntegerPair() );\n\n      for ( int i = 0; i < getKeystream().length; i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, \"lookup_key_name\", getKeystream()[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"lookup_key_field\", getKeylookup()[i] );\n      }","sourceCodeStart":290,"sourceCodeEnd":326,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/streamlookup/StreamLookupMeta.java#L290-L326","documentation":"StreamLookupMeta throws this KettleException when an unexpected exception occurs while reading the Stream Lookup step's settings from the Pentaho repository during readRep(). The message wraps the underlying exception (e.g. repository connectivity or attribute-read failures). It indicates the step metadata could not be loaded, so the transformation definition is incomplete.","triggerScenarios":"Calling readRep() when rep.getStepAttributeString(...) or ValueMetaFactory.getIdForValueMeta(...) throws — e.g. repository connection drops mid-read, id_step refers to a missing/corrupt step record, or an invalid return_value_type string.","commonSituations":"Corrupt or partially migrated repository rows for a Stream Lookup step; stale repository sessions; renaming value type names between Pentaho versions so getIdForValueMeta fails.","solutions":["Check the wrapped cause exception to identify the real repository/parse failure","Verify the repository connection is healthy and retry loading the transformation","Inspect the r_step_attribute rows for this step id for missing or corrupt 'return_*' attributes","Re-open and re-save the step in Spoon to rewrite its repository attributes"],"exampleFix":"// before\nthrow new KettleException(BaseMessages.getString(PKG, \"StreamLookupMeta.Exception.UnexpecteErrorReadingStepInfoFromRepository\"), e);\n// after\n// fix the cause: verify repository connectivity / repair step attributes, then\n// log e at DEBUG and retry readRep with a fresh Repository connection","handlingStrategy":"try-catch","validationCode":"// before load\nif (!repository.isConnected()) repository.connect(user, pass);\nObjectId idStep = transMeta.getStepMeta(stepName).getStepMetaInterface() != null ? null : null; // ensure step exists\n// verify step record exists before readRep:\n// ObjectId id = repository.getStepID(loggedObject, stepName) / check repository.getObjectInformation(idStep, ...) != null","typeGuard":"boolean isStepPresent(Repository rep, ObjectId idStep) {\n  try { return idStep != null && rep.getObjectInformation(idStep, RepositoryObjectType.TRANSFORMATION) != null; }\n  catch (Exception e) { return false; }\n}","tryCatchPattern":"try {\n  streamLookupMeta.readRep(repository, metaStore, idStep, databases);\n} catch (KettleException e) {\n  logError(\"Failed to read StreamLookup step from repository: \" + e.getCause(), e);\n  // rebuild step defaults: streamLookupMeta.setDefault();\n}","preventionTips":["Keep repository connections alive/healthy before loading transformations","Verify step attribute rows exist after repository imports/migrations","Log and inspect the cause chain, not just the wrapper message","Re-save steps in Spoon after version upgrades to refresh stored attributes"],"tags":["repository","metadata-load","pdi","step-metadata"],"backgroundTag":"database-query-failed","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"}