{"record":{"id":"bbe3a6f31b431407","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-job-entry-of-type-shell-from-the-repository","errorCode":null,"errorMessage":"Unable to load job entry of type 'shell' from the repository with id_jobentry=","messagePattern":"Unable to load job entry of type 'shell' from the repository with id_jobentry=","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/shell/JobEntryShell.java","lineNumber":217,"sourceCode":"      setAppendLogfile = rep.getJobEntryAttributeBoolean( id_jobentry, \"set_append_logfile\" );\n      addDate = rep.getJobEntryAttributeBoolean( id_jobentry, \"add_date\" );\n      addTime = rep.getJobEntryAttributeBoolean( id_jobentry, \"add_time\" );\n      logfile = rep.getJobEntryAttributeString( id_jobentry, \"logfile\" );\n      logext = rep.getJobEntryAttributeString( id_jobentry, \"logext\" );\n      logFileLevel = LogLevel.getLogLevelForCode( rep.getJobEntryAttributeString( id_jobentry, \"loglevel\" ) );\n      insertScript = rep.getJobEntryAttributeBoolean( id_jobentry, \"insertScript\" );\n\n      script = rep.getJobEntryAttributeString( id_jobentry, \"script\" );\n      // How many arguments?\n      int argnr = rep.countNrJobEntryAttributes( id_jobentry, \"argument\" );\n      allocate( argnr );\n\n      // Read them all...\n      for ( int a = 0; a < argnr; a++ ) {\n        arguments[a] = rep.getJobEntryAttributeString( id_jobentry, a, \"argument\" );\n      }\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( \"Unable to load job entry of type 'shell' from the repository with id_jobentry=\"\n        + id_jobentry, dbe );\n    }\n  }\n\n  // Save the attributes of this job entry\n  //\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {\n    try {\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"file_name\", filename );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"work_directory\", workDirectory );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"arg_from_previous\", argFromPrevious );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"exec_per_row\", execPerRow );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"set_logfile\", setLogfile );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"set_append_logfile\", setAppendLogfile );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"add_date\", addDate );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"add_time\", addTime );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"logfile\", logfile );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"logext\", logext );","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/shell/JobEntryShell.java#L199-L235","documentation":"JobEntryShell.loadRep reads the job entry's attributes from the repository; a KettleDatabaseException while reading (including per-index 'argument' rows) is wrapped in KettleException('Unable to load job entry of type 'shell' from the repository with id_jobentry=' + id). The id is appended to locate the offending row set.","triggerScenarios":"rep.getJobEntryAttributeString(id_jobentry, a, 'argument') fails for any a < argnr — repository tables missing/corrupted, connection dropped, or r_jobentry_attribute rows inconsistent with the declared argnr.","commonSituations":"Repository database upgraded/restored partially leaving orphaned rows; argnr in r_jobentry larger than the number of argument rows stored; DB network failure mid-load; read permission revoked on repository tables.","solutions":["Check the nested KettleDatabaseException for the SQL/DB error","Inspect r_jobentry_attribute rows for the given id_jobentry and fix/restore missing argument rows","Test repository connectivity and credentials","If a repository upgrade broke it, run the repository repair/upgrade scripts"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  jobEntryShell.loadRep(rep, metaStore, idJobentry, databases, slaveServers);\n} catch (KettleException e) {\n  logError(\"Repository load failed for id_jobentry=\" + idJobentry + \": \" + e.getCause().getMessage(), e);\n}","preventionTips":["Monitor repository DB connectivity before opening jobs","Ensure r_jobentry_attribute rows match each entry's argnr","Run repository upgrade/repair scripts after version migrations","Grant users read access to all repository tables"],"tags":["database","repository","job-entry","shell","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"}