{"record":{"id":"1c5028e110620759","repo":"pentaho/pentaho-kettle","slug":"dbprocmeta-exception-unexpectederrorreadingstepinfo","errorCode":"DBProcMeta.Exception.UnexpectedErrorReadingStepInfo","errorMessage":"DBProcMeta.Exception.UnexpectedErrorReadingStepInfo","messagePattern":"DBProcMeta\\.Exception\\.UnexpectedErrorReadingStepInfo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/dbproc/DBProcMeta.java","lineNumber":355,"sourceCode":"  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {\n    try {\n      database = rep.loadDatabaseMetaFromStepAttribute( id_step, \"id_connection\", databases );\n      procedure = rep.getStepAttributeString( id_step, \"procedure\" );\n\n      int nrargs = rep.countNrStepAttributes( id_step, \"arg_name\" );\n      allocate( nrargs );\n\n      for ( int i = 0; i < nrargs; i++ ) {\n        argument[i] = rep.getStepAttributeString( id_step, i, \"arg_name\" );\n        argumentDirection[i] = rep.getStepAttributeString( id_step, i, \"arg_direction\" );\n        argumentType[i] = ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( id_step, i, \"arg_type\" ) );\n      }\n\n      resultName = rep.getStepAttributeString( id_step, \"result_name\" );\n      resultType = ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( id_step, \"result_type\" ) );\n      autoCommit = rep.getStepAttributeBoolean( id_step, 0, \"auto_commit\", true );\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"DBProcMeta.Exception.UnexpectedErrorReadingStepInfo\" ), e );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {\n    try {\n      rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, \"id_connection\", database );\n      rep.saveStepAttribute( id_transformation, id_step, \"procedure\", procedure );\n\n      for ( int i = 0; i < argument.length; i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, \"arg_name\", argument[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"arg_direction\", argumentDirection[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"arg_type\",\n          ValueMetaFactory.getValueMetaName( argumentType[i] ) );\n      }\n\n      rep.saveStepAttribute( id_transformation, id_step, \"result_name\", resultName );\n      rep.saveStepAttribute( id_transformation, id_step, \"result_type\",","sourceCodeStart":337,"sourceCodeEnd":373,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/dbproc/DBProcMeta.java#L337-L373","documentation":"DBProcMeta.readRep loads the DB Procedure step configuration from the repository. Any repository read or value-conversion exception (including an unknown result type for ValueMetaFactory) is wrapped in this localized KettleException.","triggerScenarios":"Opening a repository-stored transformation where getStepAttributeString/getStepAttributeBoolean fails, or 'result_type' contains a value ValueMetaFactory cannot map to a value meta id.","commonSituations":"Repository schema/version mismatch; attributes corrupted or partially deleted; result_type attribute set by a different engine version with a type name no longer recognized.","solutions":["Check the chained cause to identify the failing attribute (commonly result_type).","Fix or blank the invalid result_type attribute in r_step_attribute, then re-save the step in Spoon.","Run the repository schema upgrade so attribute layout matches the engine version.","Re-create the DB Procedure step to regenerate repository attributes."],"exampleFix":"-- before\nUPDATE r_step_attribute SET attribute_value='strng' WHERE attribute_key='result_type';\n-- after\nUPDATE r_step_attribute SET attribute_value='String' WHERE attribute_key='result_type';","handlingStrategy":"try-catch","validationCode":"String rt = rep.getStepAttributeString(id_step, \"result_type\");\nif (rt != null && rt.length() > 0) {\n  try { ValueMetaFactory.getIdForValueMeta(rt); }\n  catch (Exception e) { throw new IllegalStateException(\"Unknown result_type: \"+rt); }\n}","typeGuard":"boolean isKnownValueType(String name){\n  try { ValueMetaFactory.getIdForValueMeta(name); return true; }\n  catch (Exception e){ return false; }\n}","tryCatchPattern":"try { meta.readRep(rep, metaStore, id_step, databases); }\ncatch (KettleException e) {\n  logError(\"DBProc repository read failed: \" + e.getCause(), e);\n}","preventionTips":["Run repository schema upgrades when upgrading Pentaho.","Validate result_type values after version migrations.","Re-create steps whose attributes were hand-repaired.","Back up repository tables before migrations."],"tags":["kettle","repository","read-failure"],"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"}