{"record":{"id":"1a030148cda8ddf5","repo":"pentaho/pentaho-kettle","slug":"dbprocmeta-exception-unabletoreadstepinfo","errorCode":"DBProcMeta.Exception.UnableToReadStepInfo","errorMessage":"DBProcMeta.Exception.UnableToReadStepInfo","messagePattern":"DBProcMeta\\.Exception\\.UnableToReadStepInfo","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/dbproc/DBProcMeta.java","lineNumber":333,"sourceCode":"      Node lookup = XMLHandler.getSubNode( stepnode, \"lookup\" );\n      nrargs = XMLHandler.countNodes( lookup, \"arg\" );\n\n      allocate( nrargs );\n\n      for ( i = 0; i < nrargs; i++ ) {\n        Node anode = XMLHandler.getSubNodeByNr( lookup, \"arg\", i );\n\n        argument[i] = XMLHandler.getTagValue( anode, \"name\" );\n        argumentDirection[i] = XMLHandler.getTagValue( anode, \"direction\" );\n        argumentType[i] = ValueMetaFactory.getIdForValueMeta( XMLHandler.getTagValue( anode, \"type\" ) );\n      }\n\n      resultName = XMLHandler.getTagValue( stepnode, \"result\", \"name\" ); // Optional, can be null\n                                                                         //\n      resultType = ValueMetaFactory.getIdForValueMeta( XMLHandler.getTagValue( stepnode, \"result\", \"type\" ) );\n      autoCommit = !\"N\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"auto_commit\" ) );\n    } catch ( Exception e ) {\n      throw new KettleXMLException( BaseMessages.getString( PKG, \"DBProcMeta.Exception.UnableToReadStepInfo\" ), e );\n    }\n  }\n\n  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\" );","sourceCodeStart":315,"sourceCodeEnd":351,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/dbproc/DBProcMeta.java#L315-L351","documentation":"DBProcMeta.readData parses the DB Procedure step's XML definition (connection, procedure name, arguments, result). Any exception during XML parsing is wrapped in this localized KettleXMLException so the transformation fails to load with the standard 'unable to read step info' message.","triggerScenarios":"loadXML encounters a malformed or unexpected <step> node: missing <procedure>, <argument>, or <result> elements, or invalid values passed to ValueMetaFactory.getIdForValueMeta for the result type.","commonSituations":"Hand-edited .ktr files; transformations from a newer Pentaho version read by an older engine; XML with missing connection references or corrupted argument blocks.","solutions":["Validate/repair the step's XML block against a known-good DB Procedure step definition.","Re-create the step in Spoon to regenerate its XML defaults.","Align engine and file versions (upgrade the engine or re-save with the current Spoon).","Read the chained cause to find the exact XML element that failed parsing."],"exampleFix":"// before: missing result block\n<step><type>DBProc</type><procedure>MY_PROC</procedure></step>\n// after\n<step><type>DBProc</type><procedure>MY_PROC</procedure><result><name>res</name><type>String</type></result></step>","handlingStrategy":"try-catch","validationCode":"if (XMLHandler.getSubNode(stepnode,\"procedure\") == null)\n  throw new IllegalArgumentException(\"DBProc step XML missing <procedure>\");","typeGuard":"boolean hasProcedure(Node n){ return XMLHandler.getSubNode(n,\"procedure\") != null; }","tryCatchPattern":"try { meta.loadXML(stepnode, databases, metaStore); }\ncatch (KettleXMLException e) {\n  logError(\"DBProc XML load failed: \" + e.getCause(), e);\n}","preventionTips":["Keep engine version aligned with transformation file version.","Avoid hand-editing .ktr XML.","Validate step XML structure before load.","Always inspect the chained cause for the parsing failure."],"tags":["kettle","xml-parsing","transformation-load"],"backgroundTag":"json-parse-error","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"}