{"record":{"id":"ff1f95bce1c19389","repo":"pentaho/pentaho-kettle","slug":"unexpected-error-reading-step-with-id-step-id-step-from-the","errorCode":null,"errorMessage":"Unexpected error reading step with id_step=<id_step> from the repository","messagePattern":"Unexpected error reading step with id_step=<id_step> from the repository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/dummy/core/src/main/java/org/pentaho/di/be/ibridge/kettle/dummy/DummyPluginMeta.java","lineNumber":163,"sourceCode":"\n      int type = ValueMetaFactory.getIdForValueMeta( typedesc );\n      value = new ValueMetaAndData( new ValueMeta( name, type ), null );\n      value.getValueMeta().setLength( length );\n      value.getValueMeta().setPrecision( precision );\n\n      if ( isnull ) {\n        value.setValueData( null );\n      } else {\n        ValueMetaInterface stringMeta = new ValueMetaString( name );\n        if ( type != ValueMetaInterface.TYPE_STRING ) {\n          text = Const.trim( text );\n        }\n        value.setValueData( value.getValueMeta().convertData( stringMeta, text ) );\n      }\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( \"error reading step with id_step=\" + id_step + \" from the repository\", dbe );\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unexpected error reading step with id_step=\" + id_step + \" from the repository\", e );\n    }\n  }\n\n  @Override\n  public void saveRep( Repository rep, ObjectId id_transformation, ObjectId id_step ) throws KettleException {\n    try {\n      rep.saveStepAttribute( id_transformation, id_step, \"value_name\", value.getValueMeta().getName() );\n      rep.saveStepAttribute( id_transformation, id_step, 0, \"value_type\", value.getValueMeta().getTypeDesc() );\n      rep.saveStepAttribute( id_transformation, id_step, 0, \"value_text\", value.getValueMeta().getString( value.getValueData() ) );\n      rep.saveStepAttribute( id_transformation, id_step, 0, \"value_null\", value.getValueMeta().isNull( value.getValueData() ) );\n      rep.saveStepAttribute( id_transformation, id_step, 0, \"value_length\", value.getValueMeta().getLength() );\n      rep.saveStepAttribute( id_transformation, id_step, 0, \"value_precision\", value.getValueMeta().getPrecision() );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( \"Unable to save step information to the repository, id_step=\" + id_step, dbe );\n    }\n  }\n\n  @Override","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/dummy/core/src/main/java/org/pentaho/di/be/ibridge/kettle/dummy/DummyPluginMeta.java#L145-L181","documentation":"The generic catch-all in DummyPluginMeta.readRep: any non-database exception during repository deserialization (ValueMetaFactory.getIdForValueMeta on an unknown type name, ClassCastException/NPE on malformed attributes, convertData failing on the stored text) is wrapped as 'Unexpected error reading step...'. It is distinct from the KettleDatabaseException branch and indicates data/format problems rather than connectivity.","triggerScenarios":"readRep encountering a stored value_type string that ValueMetaFactory.getIdForValueMeta cannot resolve (unknown/renamed type descriptor), a null value_name, or stored value_text that value.getValueMeta().convertData(stringMeta, text) cannot convert to the stored type (e.g. 'abc' in a Number field).","commonSituations":"Repository rows written by an older PDI version whose type descriptions changed; someone edited step attributes directly in the repository DB; a value_type stored as empty string after a failed save.","solutions":["Inspect the chained exception's cause — for unknown types it names the offending type descriptor.","Query the repository: SELECT * FROM R_STEP_ATTRIBUTE WHERE ID_STEP=<id_step> and check value_name/value_type/value_text for nulls or bad values.","Correct the stored attributes (fix value_type to a valid descriptor like 'Number'/'String', or value_text to a parseable value) or recreate the step.","Check for PDI version mismatch: if the transformation was saved by a newer version, load it with the matching PDI version."],"exampleFix":"// before: corrupt repository row\nvalue_type = 'Nmbr', value_text = 'abc'\n// after: valid attributes\nvalue_type = 'Number', value_text = '123.456'","handlingStrategy":"validation","validationCode":"// validate the stored attributes before calling readRep\nString typedesc = rep.getStepAttributeString( id_step, 0, \"value_type\" );\nint type = ValueMetaFactory.getIdForValueMeta( typedesc );\nif ( type < 0 ) {\n  throw new IllegalStateException( \"Unknown value_type stored: \" + typedesc );\n}","typeGuard":null,"tryCatchPattern":"try {\n  meta.readRep( rep, id_step, databases, counters );\n} catch ( KettleException e ) {\n  if ( !( e.getCause() instanceof KettleDatabaseException ) ) {\n    // data/format problem: inspect R_STEP_ATTRIBUTE rows for id_step\n    logError( \"Corrupt step attributes for id_step=\" + id_step + \": \" + e.getCause() );\n  }\n  throw e;\n}","preventionTips":["Don't edit R_STEP_ATTRIBUTE rows directly in the database","Load transformations with a PDI version compatible with the one that saved them","Recreate the step via Spoon when its attributes are corrupt","Check value_type/value_text values in the repository when the 'Unexpected error' variant appears"],"tags":["repository","deserialization","type-mismatch","pdi"],"backgroundTag":"unexpected-response-shape","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"}