{"record":{"id":"9afece3297cc0ad2","repo":"pentaho/pentaho-kettle","slug":"streamlookupmeta-exception-unabletosavestepinfotorepository","errorCode":null,"errorMessage":"StreamLookupMeta.Exception.UnableToSaveStepInfoToRepository","messagePattern":"StreamLookupMeta\\.Exception\\.UnableToSaveStepInfoToRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/streamlookup/StreamLookupMeta.java","lineNumber":336,"sourceCode":"      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      }\n\n      for ( int i = 0; i < getValue().length; i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, \"return_value_name\", getValue()[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"return_value_rename\", getValueName()[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"return_value_default\", getValueDefault()[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"return_value_type\",\n          ValueMetaFactory.getValueMetaName( getValueDefaultType()[i] ) );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"StreamLookupMeta.Exception.UnableToSaveStepInfoToRepository\" )\n        + id_step, e );\n    }\n  }\n\n  @Override\n  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,\n    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,\n    Repository repository, IMetaStore metaStore ) {\n    CheckResult cr;\n\n    if ( prev != null && prev.size() > 0 ) {\n      cr =\n        new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString(\n          PKG, \"StreamLookupMeta.CheckResult.StepReceivingFields\", prev.size() + \"\" ), stepMeta );\n      remarks.add( cr );\n\n      String error_message = \"\";","sourceCodeStart":318,"sourceCodeEnd":354,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/streamlookup/StreamLookupMeta.java#L318-L354","documentation":"StreamLookupMeta throws this KettleException in saveRep() when persisting the step's settings to the repository fails unexpectedly. The message has the step's ObjectId appended. It wraps the underlying exception, so the real cause (write failure, constraint violation, connection loss) is in the cause chain.","triggerScenarios":"Calling saveRep() when any rep.saveStepAttribute(...) call throws — repository write failure, disconnected session, invalid id_transformation/id_step, or null field arrays causing unexpected exceptions.","commonSituations":"Repository database down or read-only during save; transformation partially deleted while saving; very long field names exceeding repository column limits.","solutions":["Check the wrapped cause for the true repository write error","Reconnect to the repository and retry the save","Verify id_transformation and id_step still exist in the repository","Save the transformation to XML/file as a workaround, then re-import"],"exampleFix":"// before\nthrow new KettleException(BaseMessages.getString(PKG, \"StreamLookupMeta.Exception.UnableToSaveStepInfoToRepository\") + id_step, e);\n// after\n// ensure repository connection is open and transaction committed:\nrepository.connect(login, password); // then retry saveRep","handlingStrategy":"try-catch","validationCode":"// before save\nif (!repository.isConnected()) repository.connect(user, pass);\nif (idTransformation == null || idStep == null) throw new IllegalArgumentException(\"ids required\");\n// null-check field arrays\nif (meta.getValue() == null || meta.getValueName() == null) meta.setDefault();","typeGuard":"boolean canSave(StepMetaInterface meta) {\n  return meta != null && meta instanceof StreamLookupMeta\n    && ((StreamLookupMeta) meta).getKeyField() != null;\n}","tryCatchPattern":"try {\n  meta.saveRep(repository, metaStore, idTransformation, idStep);\n} catch (KettleException e) {\n  logError(\"Save failed for step \" + idStep + \": \" + e.getCause(), e);\n  // fallback: export to XML\n  meta.saveXML(); // or save the whole trans to file\n}","preventionTips":["Confirm repository connectivity before batch saves","Avoid modifying/deleting transformations concurrently while saving","Save to XML as backup before large repository operations","Keep field names within repository column length limits"],"tags":["repository","metadata-save","pdi","persistence"],"backgroundTag":"database-write-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"}