{"record":{"id":"c6eacae93743273c","repo":"pentaho/pentaho-kettle","slug":"gettablenamesmeta-exception-unabletoreadstepinfo","errorCode":"GetTableNamesMeta.Exception.UnableToReadStepInfo","errorMessage":"GetTableNamesMeta.Exception.UnableToReadStepInfo","messagePattern":"GetTableNamesMeta\\.Exception\\.UnableToReadStepInfo","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/gettablenames/GetTableNamesMeta.java","lineNumber":400,"sourceCode":"      includeCatalog = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"includeCatalog\" ) );\n      includeSchema = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"includeSchema\" ) );\n      includeTable = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"includeTable\" ) );\n      includeView = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"includeView\" ) );\n      includeProcedure = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"includeProcedure\" ) );\n      includeSynonym = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"includeSynonym\" ) );\n      addSchemaInOutput = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"addSchemaInOutput\" ) );\n      dynamicSchema = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"dynamicSchema\" ) );\n      schemaNameField = XMLHandler.getTagValue( stepnode, \"schemaNameField\" );\n\n      if ( XMLHandler.getTagValue( stepnode, \"schenameNameField\" ) != null ) {\n        /*\n         * Fix for wrong field name in the 7.0. Can be removed if we don't want to keep backward compatibility with 7.0\n         * tranformations.\n         */\n        schemaNameField = XMLHandler.getTagValue( stepnode, \"schenameNameField\" );\n      }\n    } catch ( Exception e ) {\n      throw new KettleXMLException( BaseMessages.getString(\n        PKG, \"GetTableNamesMeta.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      this.databases = databases;\n      database = rep.loadDatabaseMetaFromStepAttribute( id_step, \"id_connection\", databases );\n      schemaname = rep.getStepAttributeString( id_step, \"schemaname\" );\n      tablenamefieldname = rep.getStepAttributeString( id_step, \"tablenamefieldname\" );\n      objecttypefieldname = rep.getStepAttributeString( id_step, \"objecttypefieldname\" );\n      sqlcreationfieldname = rep.getStepAttributeString( id_step, \"sqlcreationfieldname\" );\n\n      issystemobjectfieldname = rep.getStepAttributeString( id_step, \"issystemobjectfieldname\" );\n      includeCatalog = rep.getStepAttributeBoolean( id_step, \"includeCatalog\" );\n      includeSchema = rep.getStepAttributeBoolean( id_step, \"includeSchema\" );\n      includeTable = rep.getStepAttributeBoolean( id_step, \"includeTable\" );\n      includeView = rep.getStepAttributeBoolean( id_step, \"includeView\" );","sourceCodeStart":382,"sourceCodeEnd":418,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/gettablenames/GetTableNamesMeta.java#L382-L418","documentation":"GetTableNamesMeta.readData (invoked via loadXML) parses the step's XML node to rebuild step metadata and wraps any parsing exception in a KettleXMLException with this localized message. It means the step's configuration could not be read from the transformation XML — the .ktr node is malformed or contains unexpected content.","triggerScenarios":"loadXML calls readData on a <step> node whose child tags are missing or of unexpected type (e.g. XMLHandler.getTagValue returns bad data, NumberFormatException from tag-value-to-int conversions); includes the 7.0 legacy 'schenameNameField' compatibility path.","commonSituations":"Hand-edited or truncated .ktr file; transformation produced by a different/older Pentaho version whose XML tags don't match; XML corrupted by a bad merge or diff tool.","solutions":["Check e.getCause() to identify the exact parsing failure (number format, null node, etc.).","Open the .ktr in Spoon and delete/re-add the Get Table Names step to regenerate clean XML.","Validate the XML file is well-formed (xmllint) and not truncated.","If migrating from 7.0, confirm the legacy 'schenameNameField' fallback applies or manually rename the tag to 'schemaNameField'."],"exampleFix":"// before: hand-edited XML tag mismatch\n<schenameNameField>mySchema</schenameNameField> <!-- 7.0 typo tag -->\n// after: regenerate step XML with the correct tag\n<schemaNameField>mySchema</schemaNameField>","handlingStrategy":"try-catch","validationCode":"// validate the .ktr parses as XML before loading\nDocumentBuilderFactory.newInstance().newDocumentBuilder().parse( new File( ktrPath ) );","typeGuard":null,"tryCatchPattern":"try {\n  TransMeta tm = new TransMeta( ktrPath );\n} catch ( KettleXMLException e ) {\n  logError( \"Step XML unreadable: \" + e.getCause() + \" - recreate the step in Spoon\" );\n}","preventionTips":["Don't hand-edit .ktr files; use Spoon.","Keep transformations in version control to restore clean copies.","Migrate old (7.0) transformations through Spoon to refresh XML tags."],"tags":["kettle","xml","deserialization","metadata"],"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"}