{"record":{"id":"d205796e75667b6c","repo":"pentaho/pentaho-kettle","slug":"gettablenamesmeta-exception-unexpectederrorreadingstepinfo","errorCode":"GetTableNamesMeta.Exception.UnexpectedErrorReadingStepInfo","errorMessage":"GetTableNamesMeta.Exception.UnexpectedErrorReadingStepInfo","messagePattern":"GetTableNamesMeta\\.Exception\\.UnexpectedErrorReadingStepInfo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/gettablenames/GetTableNamesMeta.java","lineNumber":433,"sourceCode":"      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\" );\n      includeProcedure = rep.getStepAttributeBoolean( id_step, \"includeProcedure\" );\n      includeSynonym = rep.getStepAttributeBoolean( id_step, \"includeSynonym\" );\n      addSchemaInOutput = rep.getStepAttributeBoolean( id_step, \"addSchemaInOutput\" );\n      dynamicSchema = rep.getStepAttributeBoolean( id_step, \"dynamicSchema\" );\n      schemaNameField = rep.getStepAttributeString( id_step, \"schemaNameField\" );\n\n      if ( rep.getStepAttributeString( id_step, \"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 = rep.getStepAttributeString( id_step, \"schenameNameField\" );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"GetTableNamesMeta.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, \"schemaname\", schemaname );\n      rep.saveStepAttribute( id_transformation, id_step, \"tablenamefieldname\", tablenamefieldname );\n      rep.saveStepAttribute( id_transformation, id_step, \"objecttypefieldname\", objecttypefieldname );\n      rep.saveStepAttribute( id_transformation, id_step, \"sqlcreationfieldname\", sqlcreationfieldname );\n\n      rep.saveStepAttribute( id_transformation, id_step, \"issystemobjectfieldname\", issystemobjectfieldname );\n      // Also, save the step-database relationship!\n      if ( database != null ) {\n        rep.insertStepDatabase( id_transformation, id_step, database.getObjectId() );\n      }\n      rep.saveStepAttribute( id_transformation, id_step, \"includeCatalog\", includeCatalog );","sourceCodeStart":415,"sourceCodeEnd":451,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/gettablenames/GetTableNamesMeta.java#L415-L451","documentation":"GetTableNamesMeta.readRep loads the step's settings from repository step attributes and wraps any exception in a KettleException with this localized 'Unexpected error reading step info' message. It indicates the step's stored attributes could not be read from the repository (read failure, bad stored value, or repository error).","triggerScenarios":"readRep throws while calling rep.getStepAttributeString / numeric getters for the step's attributes — e.g. repository connection drops, attribute value cannot be converted to a number/boolean, or the id_step no longer exists.","commonSituations":"Repository partially migrated between Pentaho versions so stored attribute types changed; repository connection lost during transformation load; stale id_step after repository cleanup.","solutions":["Inspect the cause chain for the underlying repository exception.","Reconnect to the repository and retry loading the transformation.","Open the step in Spoon and re-save it to rewrite its attributes cleanly.","Verify repository schema/version matches your Pentaho client version."],"exampleFix":"// before\ntry {\n  loadTransformationFromRepository( rep, id_step );\n} catch ( KettleException e ) {\n  // Unexpected error reading step info - no recovery\n}\n// after\ntry {\n  loadTransformationFromRepository( rep, id_step );\n} catch ( KettleException e ) {\n  rep.disconnect();\n  rep.connect( env, user, pass );\n  loadTransformationFromRepository( rep, id_step ); // retry after reconnect\n}","handlingStrategy":"try-catch","validationCode":"if ( rep == null || !rep.isConnected() ) {\n  throw new IllegalStateException( \"Repository not connected before readRep\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  transMeta.readRep( rep, metaStore, idStep, null );\n} catch ( KettleException e ) {\n  logError( \"Repository read failed: \" + e.getCause() );\n  // reconnect and retry once\n}","preventionTips":["Verify repository connectivity and credentials before loading transformations.","Re-save steps after Pentaho version upgrades to refresh stored attributes.","Monitor repository DB availability in scheduled jobs."],"tags":["kettle","repository","metadata","deserialization"],"backgroundTag":"file-read-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"}