{"record":{"id":"8c7eaa779870b599","repo":"pentaho/pentaho-kettle","slug":"monetdbbulkloadermeta-exception-8c7eaa","errorCode":"MonetDBBulkLoaderMeta.Exception.UnableToSaveStepInfoToRepository","errorMessage":"MonetDBBulkLoaderMeta.Exception.UnableToSaveStepInfoToRepository","messagePattern":"MonetDBBulkLoaderMeta\\.Exception\\.UnableToSaveStepInfoToRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/monet-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/monetdbbulkloader/MonetDBBulkLoaderMeta.java","lineNumber":477,"sourceCode":"      // MonetDB Settings Tab\n      rep.saveStepAttribute( id_transformation, id_step, TAG_FIELD_SEPARATOR, fieldSeparator );\n      rep.saveStepAttribute( id_transformation, id_step, \"field_enclosure\", fieldEnclosure );\n      rep.saveStepAttribute( id_transformation, id_step, \"null_representation\", NULLrepresentation );\n      rep.saveStepAttribute( id_transformation, id_step, \"encoding\", encoding );\n\n      // Output Fields Tab\n      for ( int i = 0; i < fieldTable.length; i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, \"stream_name\", fieldTable[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_name\", fieldStream[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_format_ok\", fieldFormatOk[i] );\n      }\n\n      // Also, save the step-database relationship!\n      if ( databaseMeta != null ) {\n        rep.insertStepDatabase( id_transformation, id_step, databaseMeta.getObjectId() );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n          PKG, \"MonetDBBulkLoaderMeta.Exception.UnableToSaveStepInfoToRepository\" )\n          + id_step, e );\n    }\n  }\n\n  @Override\n  public void getFields( Bowl bowl, RowMetaInterface rowMeta, String origin, RowMetaInterface[] info, StepMeta nextStep,\n      VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {\n    // Default: nothing changes to rowMeta\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 ( databaseMeta != null ) {","sourceCodeStart":459,"sourceCodeEnd":495,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/monet-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/monetdbbulkloader/MonetDBBulkLoaderMeta.java#L459-L495","documentation":"MonetDBBulkLoaderMeta.saveRep() wraps any Exception thrown while persisting the step's configuration (field mappings, database relation) to the repository in a KettleException carrying the 'UnableToSaveStepInfoToRepository' message. It means the step metadata could not be written; the message string is concatenated with id_step to identify which step failed. The original exception is preserved as the cause.","triggerScenarios":"Calling saveRep() when the Repository throws on any of the save operations, notably rep.insertStepDatabase(id_transformation, id_step, databaseMeta.getObjectId()) or attribute writes — e.g. repository connection lost, insufficient permissions, or id_step not yet persisted.","commonSituations":"Saving a transformation when the repository database is down or read-only; the step's databaseMeta points to a deleted database object; repository user lacks INSERT permissions on r_step_attribute/r_step_database; disk full on the repository DB server.","solutions":["Check the cause chain for the underlying KettleDatabaseException and fix the repository connectivity/permission problem","Verify the referenced databaseMeta still exists in the repository (re-select the connection in the step dialog)","Ensure the transformation itself has been saved first so id_step is valid","Retry the save after restoring the repository connection"],"exampleFix":"// before\nrep.insertStepDatabase(id_transformation, id_step, databaseMeta.getObjectId());\n// after\nif (databaseMeta != null && databaseMeta.getObjectId() != null) {\n  rep.insertStepDatabase(id_transformation, id_step, databaseMeta.getObjectId());\n}","handlingStrategy":"try-catch","validationCode":"// Verify repository writability before saving\nif (rep == null || !rep.isConnected()) throw new KettleException(\"Repository is not connected\");\nif (id_step == null) throw new KettleException(\"Step must be persisted before saving step metadata\");\nif (meta.getDatabaseMeta() != null && meta.getDatabaseMeta().getObjectId() == null) {\n  throw new KettleException(\"Referenced database connection is not saved in the repository\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  meta.saveRep(rep, metaStore, idTransformation, idStep);\n} catch (KettleException e) {\n  logError(\"Save failed for step \" + idStep + \": \" + e.getCause(), e);\n  throw e; // retry after fixing repository connectivity/permissions\n}","preventionTips":["Save the database connection and the transformation before saving step metadata","Run PDI with a repository user that has INSERT/UPDATE rights","Monitor repository DB disk space and connectivity in scheduled environments","Keep the referenced databaseMeta objects in sync (re-select after renaming connections)"],"tags":["repository","pdi","metadata-persist","database-write"],"backgroundTag":"file-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"}