{"record":{"id":"1d9c9f3040a0f430","repo":"pentaho/pentaho-kettle","slug":"error-0002-cannot-load-job-from-repository-1d9c9f","errorCode":"ERROR_0002_Cannot_Load_Job_From_Repository","errorMessage":"JobEntryFilesExist.ERROR_0002_Cannot_Load_Job_From_Repository","messagePattern":"JobEntryFilesExist\\.ERROR_0002_Cannot_Load_Job_From_Repository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/filesexist/JobEntryFilesExist.java","lineNumber":143,"sourceCode":"        PKG, \"JobEntryFilesExist.ERROR_0001_Cannot_Load_Job_Entry_From_Xml_Node\", xe.getMessage() ) );\n    }\n  }\n\n  public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,\n    List<SlaveServer> slaveServers ) throws KettleException {\n    try {\n      filename = rep.getJobEntryAttributeString( id_jobentry, \"filename\" );\n\n      // How many arguments?\n      int argnr = rep.countNrJobEntryAttributes( id_jobentry, \"name\" );\n      allocate( argnr );\n\n      // Read them all...\n      for ( int a = 0; a < argnr; a++ ) {\n        arguments[a] = rep.getJobEntryAttributeString( id_jobentry, a, \"name\" );\n      }\n    } catch ( KettleException dbe ) {\n      throw new KettleException( BaseMessages\n        .getString( PKG, \"JobEntryFilesExist.ERROR_0002_Cannot_Load_Job_From_Repository\", \"\" + id_jobentry, dbe\n          .getMessage() ) );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {\n    try {\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"filename\", filename );\n\n      // save the arguments...\n      if ( arguments != null ) {\n        for ( int i = 0; i < arguments.length; i++ ) {\n          rep.saveJobEntryAttribute( id_job, getObjectId(), i, \"name\", arguments[i] );\n        }\n      }\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"JobEntryFilesExist.ERROR_0003_Cannot_Save_Job_Entry\", \"\" + id_job, dbe.getMessage() ) );","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/filesexist/JobEntryFilesExist.java#L125-L161","documentation":"Thrown by JobEntryFilesExist.loadRep when reading the entry's argument (filename) attributes from the repository fails. It wraps the KettleException with a localized message including the id_jobentry and dbe.getMessage(), but does not chain the cause. It means repository attribute reads for this entry failed.","triggerScenarios":"Loading from a database repository when getJobEntryAttributeString(id_jobentry, a, \"name\") or the argument-count read throws — missing rows, connection failure, repository error.","commonSituations":"Repository upgrade mismatch; partial save left some 'name' attribute rows missing; transient DB outage while opening a job.","solutions":["Verify repository connectivity and retry the load","Check r_jobentry_attribute rows with attr_nr indexes exist for this id_jobentry","Apply repository schema upgrade scripts if versions differ","Re-save the entry from Spoon to rebuild its attribute rows"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Check argument rows exist before loading\nint argnr = rep.countNumJobEntryAttributes(id_jobentry);\nif (argnr <= 0) { throw new IllegalStateException(\"no argument rows for entry \" + id_jobentry); }","typeGuard":null,"tryCatchPattern":"try {\n    jobEntry.loadRep(rep, metaStore, id_jobentry, databases, slaveServers);\n} catch (KettleException e) {\n    logError(\"Repository load failed: \" + e.getMessage());\n    // reconnect and retry; cause is not chained, use getMessage()\n}","preventionTips":["Re-save entries after repository upgrades","Avoid partial saves/interruptions mid-save","Monitor repository DB health","Back up repository before manual row edits"],"tags":["repository","database","job-entry"],"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"}