{"record":{"id":"c51217918fcc11fe","repo":"pentaho/pentaho-kettle","slug":"nullifmeta-exception","errorCode":null,"errorMessage":"NullIfMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository","messagePattern":"NullIfMeta\\.Exception\\.UnexpectedErrorReadingStepInfoFromRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/nullif/NullIfMeta.java","lineNumber":213,"sourceCode":"    }\n    retval.append( \"      </fields>\" + Const.CR );\n\n    return retval.toString();\n  }\n\n  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases )\n    throws KettleException {\n    try {\n      int nrfields = rep.countNrStepAttributes( id_step, \"field_name\" );\n\n      allocate( nrfields );\n\n      for ( int i = 0; i < nrfields; i++ ) {\n        fields[i].setFieldName( rep.getStepAttributeString( id_step, i, \"field_name\" ) );\n        fields[i].setFieldValue( rep.getStepAttributeString( id_step, i, \"field_value\" ) );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG,\n          \"NullIfMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository\" ), e );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step )\n    throws KettleException {\n    try {\n      for ( int i = 0; i < fields.length; i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_name\", fields[i].getFieldName() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_value\", fields[i].getFieldValue() );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"NullIfMeta.Exception.UnableToSaveStepInfoToRepository\" )\n          + id_step, e );\n    }\n\n  }\n","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/nullif/NullIfMeta.java#L195-L231","documentation":"NullIfMeta.readRep() loads the Null If step's configured fields from the Pentaho repository using rep.getStepAttributeString(...). Any exception during these reads is wrapped in a KettleException with this 'UnexpectedErrorReadingStepInfoFromRepository' message, chaining the cause.","triggerScenarios":"Calling readRep(rep, metaStore, id_step) when repository attribute lookups fail — bad id_step, DB connectivity loss, corrupted/missing R_STEP_ATTRIBUTE rows.","commonSituations":"Repository database unavailable while opening a transformation; step metadata deleted or partially saved; schema drift between Pentaho versions; concurrent edits to the same transformation.","solutions":["Check getCause() for the underlying repository/database error.","Confirm the repository connection works and id_step exists in the repository tables.","Re-save or re-import the step metadata; restore from backup if rows are corrupted.","Verify repository schema is upgraded to your Pentaho version."],"exampleFix":"null","handlingStrategy":"try-catch","validationCode":"// Confirm the step id exists before reading\n// e.g. ObjectId id = rep.getStepID(stepName, transMeta.getObjectId()); if (id == null) fail early;","typeGuard":null,"tryCatchPattern":"try { meta.readRep(rep, metaStore, idStep, databases); } catch (KettleException e) { log.error(\"readRep failed for step \" + idStep + \": \" + e.getCause(), e); throw e; }","preventionTips":["Test repository connections before batch-loading transformations.","Back up repository tables regularly.","Avoid concurrent modification of the same transformation.","Inspect chained causes instead of only the wrapper message."],"tags":["kettle","repository","database","metadata-load"],"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"}