{"record":{"id":"b8144bc97069a34f","repo":"pentaho/pentaho-kettle","slug":"gettablenamesmeta-exception-unabletosavestepinfo","errorCode":"GetTableNamesMeta.Exception.UnableToSaveStepInfo","errorMessage":"GetTableNamesMeta.Exception.UnableToSaveStepInfo","messagePattern":"GetTableNamesMeta\\.Exception\\.UnableToSaveStepInfo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/gettablenames/GetTableNamesMeta.java","lineNumber":461,"sourceCode":"      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 );\n      rep.saveStepAttribute( id_transformation, id_step, \"includeSchema\", includeSchema );\n      rep.saveStepAttribute( id_transformation, id_step, \"includeTable\", includeTable );\n      rep.saveStepAttribute( id_transformation, id_step, \"includeView\", includeView );\n      rep.saveStepAttribute( id_transformation, id_step, \"includeProcedure\", includeProcedure );\n      rep.saveStepAttribute( id_transformation, id_step, \"includeSynonym\", includeSynonym );\n      rep.saveStepAttribute( id_transformation, id_step, \"addSchemaInOutput\", addSchemaInOutput );\n      rep.saveStepAttribute( id_transformation, id_step, \"dynamicSchema\", dynamicSchema );\n      rep.saveStepAttribute( id_transformation, id_step, \"schemaNameField\", schemaNameField );\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"GetTableNamesMeta.Exception.UnableToSaveStepInfo\" )\n        + id_step, e );\n    }\n  }\n\n  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,\n    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,\n    Repository repository, IMetaStore metaStore ) {\n    CheckResult cr;\n    String error_message = \"\";\n\n    if ( database == null ) {\n      error_message = BaseMessages.getString( PKG, \"GetTableNamesMeta.CheckResult.InvalidConnection\" );\n      cr = new CheckResult( CheckResult.TYPE_RESULT_ERROR, error_message, stepMeta );\n      remarks.add( cr );\n    }\n    if ( Utils.isEmpty( tablenamefieldname ) ) {\n      error_message = BaseMessages.getString( PKG, \"GetTableNamesMeta.CheckResult.TablenameFieldNameMissing\" );\n      cr = new CheckResult( CheckResult.TYPE_RESULT_ERROR, error_message, stepMeta );","sourceCodeStart":443,"sourceCodeEnd":479,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/gettablenames/GetTableNamesMeta.java#L443-L479","documentation":"GetTableNamesMeta.saveRep writes the step's many boolean/string settings (includeTable, includeProcedure, includeSynonym, addSchemaInOutput, dynamicSchema, schemaNameField, etc.) via rep.saveStepAttribute and wraps any failure in a KettleException with this localized message plus id_step appended. The original repository error is preserved as the cause.","triggerScenarios":"Any saveStepAttribute call inside saveRep throws — repository unavailable, R_STEP_ATTRIBUTE table missing or locked, insufficient privileges, or transaction rollback while saving the transformation.","commonSituations":"DB repository connection dropped mid-save; read-only repository user; repository schema not upgraded to current version; disk full on the repository database server.","solutions":["Read e.getCause() for the underlying repository error and fix that first (connectivity, privileges, disk).","Reconnect to the repository and re-save the transformation.","Ensure the repository schema matches your Pentaho version (apply upgrade scripts).","Grant the repository user INSERT/UPDATE rights on the step attribute tables."],"exampleFix":"// before: save fails with no diagnostics\nmeta.saveRep( rep, metaStore, id_transformation, id_step );\n// after\ntry {\n  meta.saveRep( rep, metaStore, id_transformation, id_step );\n} catch ( KettleException e ) {\n  logError( \"Save failed for id_step=\" + id_step + \": \" + e.getCause() );\n  throw e;\n}","handlingStrategy":"try-catch","validationCode":"if ( rep == null || !rep.isConnected() ) {\n  throw new IllegalStateException( \"Repository not connected before saveRep\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  meta.saveRep( rep, metaStore, idTrans, idStep );\n} catch ( KettleException e ) {\n  logError( \"Save failed for id_step=\" + idStep + \": \" + e.getCause() );\n  // fix repository access, then retry\n}","preventionTips":["Ensure sufficient disk space on the repository DB host.","Use a repository account with INSERT/UPDATE rights.","Keep the repository schema at the matching Pentaho version."],"tags":["kettle","repository","persistence","metadata"],"backgroundTag":"database-write-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"}