{"record":{"id":"bce9df993d51328a","repo":"pentaho/pentaho-kettle","slug":"injectormeta-exception-errorreadingstepinfofromrepository","errorCode":null,"errorMessage":"InjectorMeta.Exception.ErrorReadingStepInfoFromRepository","messagePattern":"InjectorMeta\\.Exception\\.ErrorReadingStepInfoFromRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/injector/InjectorMeta.java","lineNumber":194,"sourceCode":"  }\n\n  public void setDefault() {\n    allocate( 0 );\n  }\n\n  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {\n    try {\n      int nrfields = rep.countNrStepAttributes( id_step, \"field_name\" );\n      allocate( nrfields );\n\n      for ( int i = 0; i < nrfields; i++ ) {\n        fieldname[i] = rep.getStepAttributeString( id_step, i, \"field_name\" );\n        type[i] = ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( id_step, i, \"field_type\" ) );\n        length[i] = (int) rep.getStepAttributeInteger( id_step, i, \"field_length\" );\n        precision[i] = (int) rep.getStepAttributeInteger( id_step, i, \"field_precision\" );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"InjectorMeta.Exception.ErrorReadingStepInfoFromRepository\" ), e );\n    }\n\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {\n    try {\n      for ( int i = 0; i < fieldname.length; i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_name\", fieldname[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_type\",\n          ValueMetaFactory.getValueMetaName( type[i] ) );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_length\", length[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_precision\", precision[i] );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"InjectorMeta.Exception.UnableToSaveStepInfoToRepository\" )\n        + id_step, e );","sourceCodeStart":176,"sourceCodeEnd":212,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/injector/InjectorMeta.java#L176-L212","documentation":"InjectorMeta.readRep() reads the injector step's field definitions (name, type, length, precision) from the repository and wraps any exception in a KettleException with this localized message. The injector step's field layout cannot be reconstructed, so rows injected at runtime would not match the saved definition.","triggerScenarios":"readRep during transformation load while rep.getStepAttributeString/getStepAttributeInteger or ValueMetaFactory.getIdForValueMeta throws — repository read failure or an unknown field_type name string.","commonSituations":"field_type attribute contains an invalid value type name (saved by a different version or external tool); repository DB unreachable; attribute rows missing for id_step.","solutions":["Check getCause() for the actual failure (DB error vs. invalid type name)","Fix the field_type values stored in the repository (re-save the step via Spoon)","Verify repository connectivity and schema version compatibility","Recreate the injector step and re-save the transformation"],"exampleFix":"// before (repo row)\nfield_type = \"INTGER\" // typo\n// after\nfield_type = \"Integer\"","handlingStrategy":"try-catch","validationCode":"if (!repo.isConnected()) { repo.connect(user, pass); }\nArrays.stream(typeNames).forEach(t -> { if (!isKnownType(t)) throw new IllegalStateException(t); });","typeGuard":"boolean isKnownType(String t) { try { ValueMetaFactory.getIdForValueMeta(t); return true; } catch (Exception e) { return false; } }","tryCatchPattern":"try { TransMeta tm = new TransMeta(repo, dir, transName, monitor, metaStore); } catch (KettleException e) { logger.error(\"Injector load failed: \" + e.getCause(), e); }","preventionTips":["Edit injector fields only via the step dialog","Keep PDI and repository versions aligned","Log getCause() to distinguish DB vs. config errors"],"tags":["kettle","repository","injector","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"}