{"record":{"id":"f042d98bb13f5250","repo":"pentaho/pentaho-kettle","slug":"unable-to-save-job-entry-of-type-job-to-the-repository-with","errorCode":null,"errorMessage":"Unable to save job entry of type job to the repository with id_job=","messagePattern":"Unable to save job entry of type job to the repository with id_job=","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/job/JobEntryJob.java","lineNumber":607,"sourceCode":"        for ( int i = 0; i < arguments.length; i++ ) {\n          rep.saveJobEntryAttribute( id_job, getObjectId(), i, \"argument\", arguments[i] );\n        }\n      }\n\n      // save the parameters...\n      if ( parameters != null ) {\n        for ( int i = 0; i < parameters.length; i++ ) {\n          rep.saveJobEntryAttribute( id_job, getObjectId(), i, \"parameter_name\", parameters[i] );\n          rep.saveJobEntryAttribute( id_job, getObjectId(), i, \"parameter_stream_name\", Const.NVL(\n            parameterFieldNames[i], \"\" ) );\n          rep.saveJobEntryAttribute( id_job, getObjectId(), i, \"parameter_value\", Const.NVL(\n            parameterValues[i], \"\" ) );\n        }\n      }\n\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"pass_all_parameters\", passingAllParameters );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException(\n        \"Unable to save job entry of type job to the repository with id_job=\" + id_job, dbe );\n    }\n  }\n\n  @Override\n  public Result execute( Result result, int nr ) throws KettleException {\n    result.setEntryNr( nr );\n\n    LogChannelFileWriter logChannelFileWriter = null;\n\n    LogLevel jobLogLevel = parentJob.getLogLevel();\n    //Set Embedded NamedCluter MetatStore Provider Key so that it can be passed to VFS\n    if ( parentJobMeta.getNamedClusterEmbedManager() != null ) {\n      parentJobMeta.getNamedClusterEmbedManager()\n        .passEmbeddedMetastoreKey( this, parentJobMeta.getEmbeddedMetastoreProviderKey() );\n    }\n\n    if ( setLogfile ) {","sourceCodeStart":589,"sourceCodeEnd":625,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/job/JobEntryJob.java#L589-L625","documentation":"JobEntryJob.saveRep() wraps any KettleDatabaseException raised while writing the job entry's attributes (directories, filename, parameter arrays, pass_all_parameters) into the repository with this message, including the id_job. It indicates the repository write failed so the job entry metadata was not persisted.","triggerScenarios":"Calling saveRep(rep, id_job) when the repository connection drops mid-save, a parameter value violates a column constraint (too long, null), the R_JOBENTRY_ATTRIBUTE insert fails, or the DB is read-only/locked.","commonSituations":"Repository DB read-only or out of space; parameter_value exceeds column length; concurrent saves causing lock timeouts; schema mismatch after PDI upgrade.","solutions":["Read the chained KettleDatabaseException for the concrete SQL error and fix the underlying DB issue (space, locks, constraints)","Verify the repository schema matches the PDI version and run the repository upgrade/repair tool if needed","Shorten or remove oversized parameter values before saving","Retry the save after confirming the repository connection is healthy"],"exampleFix":"// before\njobEntry.saveRep(rep, idJob);\n// after\ntry {\n  jobEntry.saveRep(rep, idJob);\n} catch (KettleException e) {\n  logError(\"Save failed: \" + e.getCause(), e);\n  throw e; // surface so caller can re-run against a repaired repository\n}","handlingStrategy":"try-catch","validationCode":"// before saveRep\nif (rep == null || rep.getConnection() == null) throw new IllegalStateException(\"Repository not connected\");\nfor (String v : parameterValues) {\n  if (v != null && v.length() > MAX_PARAM_LENGTH) throw new IllegalArgumentException(\"parameter_value too long\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  entry.saveRep(rep, idJob);\n} catch (KettleException e) {\n  Throwable cause = e.getCause();\n  if (cause instanceof KettleDatabaseException) {\n    // retry after checking constraints/locks, or surface to user for repair\n  }\n  throw e;\n}","preventionTips":["Keep parameter values within repository column length limits","Save from a single process to avoid concurrent-write lock conflicts","Verify repository is not read-only before programmatic saves","Run the repository schema repair tool after PDI upgrades"],"tags":["pdi","kettle","repository","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"}