{"record":{"id":"6d2a2009116fa627","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-job-entry-of-type-job-from-the-repository","errorCode":null,"errorMessage":"Unable to load job entry of type 'job' from the repository with id_jobentry=","messagePattern":"Unable to load job entry of type 'job' from the repository with id_jobentry=","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/job/JobEntryJob.java","lineNumber":551,"sourceCode":"      for ( int a = 0; a < argnr; a++ ) {\n        arguments[a] = rep.getJobEntryAttributeString( id_jobentry, a, \"argument\" );\n      }\n\n      // How many arguments?\n      int parameternr = rep.countNrJobEntryAttributes( id_jobentry, \"parameter_name\" );\n      allocateParams( parameternr );\n\n      // Read all parameters ...\n      for ( int a = 0; a < parameternr; a++ ) {\n        parameters[a] = rep.getJobEntryAttributeString( id_jobentry, a, \"parameter_name\" );\n        parameterFieldNames[a] = rep.getJobEntryAttributeString( id_jobentry, a, \"parameter_stream_name\" );\n        parameterValues[a] = rep.getJobEntryAttributeString( id_jobentry, a, \"parameter_value\" );\n      }\n\n      passingAllParameters = rep.getJobEntryAttributeBoolean( id_jobentry, \"pass_all_parameters\", true );\n\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( \"Unable to load job entry of type 'job' from the repository with id_jobentry=\"\n        + id_jobentry, dbe );\n    }\n  }\n\n  // Save the attributes of this job entry\n  //\n  @Override\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {\n    try {\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"specification_method\", specificationMethod == null\n        ? null : specificationMethod.getCode() );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"job_object_id\", jobObjectId == null ? null : jobObjectId\n        .toString() );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"name\", getJobName() );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"dir_path\", getDirectory() != null ? getDirectory() : \"\" );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"file_name\", filename );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"arg_from_previous\", argFromPrevious );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"params_from_previous\", paramsFromPrevious );","sourceCodeStart":533,"sourceCodeEnd":569,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/job/JobEntryJob.java#L533-L569","documentation":"JobEntryJob.loadRep() wraps any KettleDatabaseException raised while reading the 'job' job entry's attributes (job name, directory, filename, parameters, pass_all_parameters, etc.) from the repository database table into a KettleException with this message plus the offending id_jobentry. It means the repository row for this job-entry is unreadable or inconsistent at the database level.","triggerScenarios":"Calling loadRep(rep, metaStore, id_jobentry, ...) when the r_jobentry_attribute rows referenced by id_jobentry are missing, the repository connection is broken, a column has an unexpected type, or a getJobEntryAttribute* call throws KettleDatabaseException (e.g. corrupt parameter rows, DB locked, schema drift between Pentaho versions).","commonSituations":"Repository schema upgraded/downgraded between Kettle/PDI versions; the job entry row was deleted or partially inserted by a failed saveRep; repository database temporarily unavailable; corrupt id_jobentry passed from metadata.","solutions":["Check the chained KettleDatabaseException (getCause()) for the real DB error and verify repository connectivity/credentials","Verify the repository tables exist and match your PDI version (run the repository repair/upgrade tool)","Inspect rows in R_JOBENTRY_ATTRIBUTE for that id_jobentry and repair or delete/re-save the job entry","Re-save the job from Spoon so loadRep/loadXML can fall back to a consistent metadata set"],"exampleFix":"// before: blindly trusting a stale id\njobEntry.loadRep(rep, metaStore, staleId, databases, slaveServers);\n// after: verify the entry exists and handle the failure\ntry {\n  if (rep.getJobEntry(id, staleId) != null) {\n    jobEntry.loadRep(rep, metaStore, staleId, databases, slaveServers);\n  }\n} catch (KettleException e) {\n  logError(\"Repository load failed for id_jobentry=\" + staleId + \": \" + e.getCause(), e);\n}","handlingStrategy":"try-catch","validationCode":"// before loadRep\nif (rep == null) throw new IllegalStateException(\"Repository not connected\");\n// optionally verify rows exist:\nObjectId id = new StringObjectId(String.valueOf(idJobentry));\n// id must reference existing R_JOBENTRY rows","typeGuard":null,"tryCatchPattern":"try {\n  entry.loadRep(rep, metaStore, idJobentry, databases, slaveServers);\n} catch (KettleException e) {\n  Throwable cause = e.getCause();\n  if (cause instanceof KettleDatabaseException) {\n    // check DB connectivity / repository schema before retrying\n  }\n  throw e;\n}","preventionTips":["Keep the repository schema aligned with the PDI version (run the upgrade tool after upgrades)","Monitor repository DB health (connectivity, locks, disk space)","Avoid hand-editing repository tables","Always log the chained cause, not just the wrapper message"],"tags":["pdi","kettle","repository","database"],"backgroundTag":"database-query-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"}