{"record":{"id":"8949294cb622cfd1","repo":"pentaho/pentaho-kettle","slug":"unable-to-save-job-entry-of-type-msgbox-info-to-the","errorCode":null,"errorMessage":"Unable to save job entry of type 'Msgbox Info' to the repository for id_job=","messagePattern":"Unable to save job entry of type 'Msgbox Info' to the repository for id_job=","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/msg-box-info/impl/src/main/java/org/pentaho/di/job/entries/msgboxinfo/JobEntryMsgBoxInfo.java","lineNumber":112,"sourceCode":"    List<SlaveServer> slaveServers ) throws KettleException {\n    try {\n      bodymessage = rep.getJobEntryAttributeString( id_jobentry, \"bodymessage\" );\n      titremessage = rep.getJobEntryAttributeString( id_jobentry, \"titremessage\" );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException(\n        \"Unable to load job entry of type 'Msgbox Info' from the repository with id_jobentry=\" + id_jobentry,\n        dbe );\n    }\n  }\n\n  // Save the attributes of this job entry\n  //\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {\n    try {\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"bodymessage\", bodymessage );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"titremessage\", titremessage );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( \"Unable to save job entry of type 'Msgbox Info' to the repository for id_job=\"\n        + id_job, dbe );\n    }\n  }\n\n  /**\n   * Display the Message Box.\n   */\n  public boolean evaluate( Result result ) {\n    try {\n      // default to ok\n\n      // Try to display MSGBOX\n      boolean response = true;\n\n      ThreadDialogs dialogs = GUIFactory.getThreadDialogs();\n      if ( dialogs != null ) {\n        response =\n          dialogs.threadMessageBox( getRealBodyMessage() + Const.CR, getRealTitleMessage(), true, Const.INFO );","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/msg-box-info/impl/src/main/java/org/pentaho/di/job/entries/msgboxinfo/JobEntryMsgBoxInfo.java#L94-L130","documentation":"JobEntryMsgBoxInfo.saveRep() wraps a KettleDatabaseException raised while calling rep.saveJobEntryAttribute() for 'bodymessage' and 'titremessage' into a KettleException with this message (id_job appended). It means the plugin could not persist this 'Msgbox Info' job entry's attributes to the repository database.","triggerScenarios":"Calling saveRep(rep, metaStore, id_job) when the INSERT/UPDATE into r_jobentry_attribute fails: connection lost, read-only database, schema mismatch, or null/oversized attribute values rejected by the DB.","commonSituations":"Repository DB outage or failover during a job save; read-only replicas; Kettle version writing columns that don't exist in an old repository schema; disk full on the database server.","solutions":["Read the nested KettleDatabaseException cause for the exact SQL error and address it (connectivity, permissions, disk).","Verify the repository schema version matches your Kettle version; apply upgrade scripts if not.","Confirm the repository user has INSERT/UPDATE rights on r_jobentry_attribute.","Retry the save after restoring DB connectivity; if persistent, export the job to XML as a workaround."],"exampleFix":"// before: saving to a possibly-dead repository without checking\njobEntry.saveRep(rep, metaStore, idJob);\n// after: check connection first\nif (!rep.getConnection().isAutoCommit()) { /* ensure healthy connection */ }\ntry {\n  jobEntry.saveRep(rep, metaStore, idJob);\n} catch (KettleException ke) {\n  logError(\"Repository save failed, exporting to XML as fallback\", ke);\n  jobEntry.getXML(); // serialize to file instead\n}","handlingStrategy":"try-catch","validationCode":"// Java: probe write access to the repository before saving\ntry {\n  rep.getConnection().prepareStatement(\"SELECT 1\").executeQuery();\n} catch (SQLException e) {\n  throw new KettleException(\"Repository not writable/available before saveRep\", e);\n}","typeGuard":"boolean repositoryWritable(Repository rep) {\n  try { rep.getConnection().getMetaData().toString(); return !rep.getConnection().isReadOnly(); }\n  catch (Exception e) { return false; }\n}","tryCatchPattern":"try {\n  jobEntry.saveRep(rep, metaStore, idJob);\n} catch (KettleException e) {\n  logError(\"Failed to persist Msgbox Info to repository (id_job=\" + idJob + \")\", e);\n  // fallback: serialize to XML so the work is not lost\n  String xml = jobEntry.getXML();\n  Files.writeString(Path.of(\"msgboxinfo-backup.xml\"), xml);\n  throw e;\n}","preventionTips":["Confirm the repository user has INSERT/UPDATE grants on r_jobentry_attribute.","Apply Kettle repository upgrade scripts after every version bump.","Watch DB disk space and failover state before large save operations.","Export jobs to XML as a backup strategy when saving to the repository."],"tags":["database","pdi","repository","job-entry","kettle","persistence"],"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"}