{"record":{"id":"4b7dbe812e126180","repo":"pentaho/pentaho-kettle","slug":"jobentrydeletefiles-unabletoloadfromrepo","errorCode":null,"errorMessage":"JobEntryDeleteFiles.UnableToLoadFromRepo","messagePattern":"JobEntryDeleteFiles\\.UnableToLoadFromRepo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/deletefiles/JobEntryDeleteFiles.java","lineNumber":172,"sourceCode":"      throw new KettleXMLException( BaseMessages.getString( PKG, \"JobEntryDeleteFiles.UnableToLoadFromXml\" ), xe );\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      argFromPrevious = rep.getJobEntryAttributeBoolean( id_jobentry, \"arg_from_previous\" );\n      includeSubfolders = rep.getJobEntryAttributeBoolean( id_jobentry, \"include_subfolders\" );\n\n      int numberOfArgs = rep.countNrJobEntryAttributes( id_jobentry, \"name\" );\n      allocate( numberOfArgs );\n\n      for ( int i = 0; i < numberOfArgs; i++ ) {\n        arguments[i] = rep.getJobEntryAttributeString( id_jobentry, i, \"name\" );\n        filemasks[i] = rep.getJobEntryAttributeString( id_jobentry, i, \"filemask\" );\n      }\n    } catch ( KettleException dbe ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobEntryDeleteFiles.UnableToLoadFromRepo\", String\n        .valueOf( id_jobentry ) ), dbe );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {\n    try {\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"arg_from_previous\", argFromPrevious );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"include_subfolders\", includeSubfolders );\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          rep.saveJobEntryAttribute( id_job, getObjectId(), i, \"filemask\", filemasks[i] );\n        }\n      }\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobEntryDeleteFiles.UnableToSaveToRepo\", String","sourceCodeStart":154,"sourceCodeEnd":190,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/deletefiles/JobEntryDeleteFiles.java#L154-L190","documentation":"JobEntryDeleteFiles.loadRep throws this KettleException when the repository throws KettleException while reading the entry's per-row 'name' and 'filemask' attributes (numberOfArgs rows) for id_jobentry. The database error is chained and the id_jobentry is embedded in the localized message. It means the wildcard-delete entry's repository state is unreadable.","triggerScenarios":"loadRep when getJobEntryAttributeString(id_jobentry, i, ...) throws — the nr-indexed attribute rows are missing, the row count stored disagrees with the rows present, or the repository connection fails.","commonSituations":"Repository restore lost per-row attribute rows; version mismatch changing row-count handling; corrupt repository table; DB connectivity drop mid-load.","solutions":["Inspect the chained KettleException for the database error","Verify the nr-indexed rows (name/filemask) exist for the id_jobentry","Re-save the Delete files entry in Spoon to rewrite its rows","Check repository schema/version alignment and repair if needed"],"exampleFix":"// before\nentry.loadRep(rep, metaStore, idJobEntry, databases, slaveServers);\n// after\ntry {\n  entry.loadRep(rep, metaStore, idJobEntry, databases, slaveServers);\n} catch (KettleException e) {\n  logError(\"DeleteFiles load failed for id=\" + idJobEntry + \": \" + (e.getCause() != null ? e.getCause().getMessage() : e.getMessage()));\n  throw e;\n}","handlingStrategy":"try-catch","validationCode":"// before loadRep\nif (id_jobentry == null) throw new IllegalArgumentException(\"id_jobentry required\");\nif (!rep.isConnected()) throw new IllegalStateException(\"Repository not connected\");","typeGuard":"boolean isRepoLoadFailure(KettleException e) {\n  return e.getMessage() != null && e.getMessage().contains(\"UnableToLoadFromRepo\");\n}","tryCatchPattern":"try {\n  entry.loadRep(rep, metaStore, idJobEntry, databases, slaveServers);\n} catch (KettleException e) {\n  log.error(\"JobEntryDeleteFiles repo load failed for id=\" + idJobEntry, e.getCause());\n  if (e.getCause() instanceof KettleDatabaseException) {\n    // verify nr-indexed name/filemask rows exist, re-save entry, retry\n  }\n  throw e;\n}","preventionTips":["Verify row-count attributes match stored rows after repository migrations","Keep repository schema aligned with Pentaho version","Always inspect the chained database cause","Back up repository before upgrades"],"tags":["kettle","repository","persistence"],"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"}