{"record":{"id":"8f29e86ef96c5988","repo":"pentaho/pentaho-kettle","slug":"luciddbstreamingloadermeta-exception-8f29e8","errorCode":"LucidDBStreamingLoaderMeta.Exception.UnableToSaveStepInfoToRepository","errorMessage":"LucidDBStreamingLoaderMeta.Exception.UnableToSaveStepInfoToRepository","messagePattern":"LucidDBStreamingLoaderMeta\\.Exception\\.UnableToSaveStepInfoToRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/lucid-db-streaming-loader/core/src/main/java/org/pentaho/di/trans/steps/luciddbstreamingloader/LucidDBStreamingLoaderMeta.java","lineNumber":376,"sourceCode":"      }\n\n      for ( int i = 0; i < fieldTableForFields.length; i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_field_name\", fieldTableForFields[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_stream_name\", fieldStreamForFields[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"insert_or_update_flag\", insOrUptFlag[i] );\n      }\n\n      for ( int i = 0; i < tabIsEnable.length; i++ ) {\n\n        rep.saveStepAttribute( id_transformation, id_step, i, \"tab_is_enable\", tabIsEnable[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, \"LucidDBStreamingLoaderMeta.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  // TODO: In future, we need to implement it to do double-check.\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\n  }\n","sourceCodeStart":358,"sourceCodeEnd":394,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/lucid-db-streaming-loader/core/src/main/java/org/pentaho/di/trans/steps/luciddbstreamingloader/LucidDBStreamingLoaderMeta.java#L358-L394","documentation":"saveRep() persists the step's settings to the repository. Any failure while writing step attributes or inserting the step-database relationship (rep.insertStepDatabase) is wrapped in a KettleException with this message plus the step id.","triggerScenarios":"Saving a transformation to a repository: saveRep(rep, metaStore, id_transformation, id_step) throws when inserting r_step_attribute values or the step-database link fails — e.g. repository DB read-only, constraint violation, or the referenced databaseMeta has no ObjectId (database not yet saved).","commonSituations":"Repository DB is read-only or disk full; the shared database connection used by the step has never been saved to the repository so its ObjectId is null; repository schema version mismatch.","solutions":["Save the database connection (databaseMeta) to the repository first so it has a valid ObjectId before saving the step.","Check repository DB connectivity and that the user has write permissions.","Look at the nested cause exception for the underlying SQL error (constraint, disk full, read-only).","Run repository upgrade/repair scripts if the schema is out of date."],"exampleFix":"// before: step references an unsaved connection\ntransMeta.addDatabase(metaOfUnsavedDb);\n// after: ensure the connection is defined/persisted before saving\nif (meta.getDatabaseMeta() != null && meta.getDatabaseMeta().getObjectId() == null) {\n  repository.save(meta.getDatabaseMeta(), null, null);\n}","handlingStrategy":"try-catch","validationCode":"if (meta.getDatabaseMeta() != null && meta.getDatabaseMeta().getObjectId() == null) {\n  repository.save(meta.getDatabaseMeta(), null, null); // persist connection first\n}","typeGuard":null,"tryCatchPattern":"try {\n  repository.save(transMeta, versionComment, null);\n} catch (KettleException e) {\n  logError(\"Save to repository failed for step \" + id_step, e.getCause());\n  throw e;\n}","preventionTips":["Always save referenced database connections to the repository before saving steps that use them.","Ensure the repository user has write privileges.","Monitor repository DB disk space and read-only states.","Run repository upgrade scripts after Pentaho version changes."],"tags":["kettle","repository","persistence","database"],"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"}