{"record":{"id":"029605ff721fdced","repo":"pentaho/pentaho-kettle","slug":"jobentrycheckfileslocked-unabletoloadfromrepo","errorCode":null,"errorMessage":"JobEntryCheckFilesLocked.UnableToLoadFromRepo","messagePattern":"JobEntryCheckFilesLocked\\.UnableToLoadFromRepo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/checkfilelocked/JobEntryCheckFilesLocked.java","lineNumber":171,"sourceCode":"\n  public void loadRep( Repository rep, IMetaStore metaStore, ObjectId idJobEntry, List<DatabaseMeta> databases,\n    List<SlaveServer> slaveServers ) throws KettleException {\n    try {\n      argFromPrevious = rep.getJobEntryAttributeBoolean( idJobEntry, ARG_FROM_PREVIOUS_ATTR );\n      includeSubfolders = rep.getJobEntryAttributeBoolean( idJobEntry, INCLUDE_SUBFOLDERS_ATTR );\n\n      // How many arguments?\n      int argnr = rep.countNrJobEntryAttributes( idJobEntry, NAME_ATTR );\n      arguments = new String[argnr];\n      filemasks = new String[argnr];\n\n      // Read them all...\n      for ( int a = 0; a < argnr; a++ ) {\n        arguments[a] = rep.getJobEntryAttributeString( idJobEntry, a, NAME_ATTR );\n        filemasks[a] = rep.getJobEntryAttributeString( idJobEntry, a, FILE_MASK_ATTR );\n      }\n    } catch ( KettleException dbe ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"JobEntryCheckFilesLocked.UnableToLoadFromRepo\", String.valueOf( idJobEntry ) ), dbe );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId idJob ) throws KettleException {\n    try {\n\n      rep.saveJobEntryAttribute( idJob, getObjectId(), ARG_FROM_PREVIOUS_ATTR, argFromPrevious );\n      rep.saveJobEntryAttribute( idJob, getObjectId(), INCLUDE_SUBFOLDERS_ATTR, includeSubfolders );\n\n      // save the arguments...\n      if ( arguments != null ) {\n        for ( int i = 0; i < arguments.length; i++ ) {\n          rep.saveJobEntryAttribute( idJob, getObjectId(), i, NAME_ATTR, arguments[i] );\n          rep.saveJobEntryAttribute( idJob, getObjectId(), i, FILE_MASK_ATTR, filemasks[i] );\n        }\n      }\n    } catch ( KettleDatabaseException dbe ) {","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/checkfilelocked/JobEntryCheckFilesLocked.java#L153-L189","documentation":"JobEntryCheckFilesLocked.loadRep wraps any KettleException from the repository when reading the entry's stored attributes (count plus per-row name/filemask values) into this KettleException, identifying the failing entry by its ObjectId.","triggerScenarios":"Calling loadRep against a repository where r_jobentry_attribute rows for this entry are missing/corrupt, the repository connection fails mid-read, or getJobEntryAttributeString throws for the given id_jobentry.","commonSituations":"Repository database restored from backup missing attribute rows; entry rows orphaned after a bad job delete; DB connection/permission problems; repository schema version mismatch.","solutions":["Check the chained KettleException/dbe for the underlying database error","Verify rows exist in r_jobentry_attribute for the reported id_jobentry","Reopen and re-save the entry in Spoon to rewrite its attributes","Fix repository connectivity/permissions, then reload the job"],"exampleFix":"// before\nentry.loadRep(rep, metaStore, staleId, databases, slaveServers); // id from an old export\n// after\nObjectId id = rep.getJobEntryId(jobMeta, entryName); // resolve a live id first\nentry.loadRep(rep, metaStore, id, databases, slaveServers);","handlingStrategy":"try-catch","validationCode":"// pre-check repository state before loadRep\nif (idJobEntry == null) throw new IllegalStateException(\"No repository id for entry\");\n// optionally: rep countJobEntryAttributes or direct SQL against r_jobentry_attribute","typeGuard":null,"tryCatchPattern":"try {\n  entry.loadRep(rep, metaStore, idJobEntry, databases, slaveServers);\n} catch (KettleException e) {\n  log.error(\"Repo load failed for entry id \" + idJobEntry + \": \" + e.getCause(), e);\n}","preventionTips":["Back up the repository DB including r_jobentry_attribute","Reload jobs through Spoon rather than copying rows between repositories","Keep repository schema version aligned with the PDI runtime"],"tags":["repository","database","job-entry","kettle"],"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"}