pentaho/pentaho-kettle · error · KettleException

Unable to load job entry of type 'shell' from the…

Error message

Unable to load job entry of type 'shell' from the repository with id_jobentry=

What it means

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.

Solutions

  1. Check the nested KettleDatabaseException for the SQL/DB error
  2. Inspect r_jobentry_attribute rows for the given id_jobentry and fix/restore missing argument rows
  3. Test repository connectivity and credentials
  4. If a repository upgrade broke it, run the repository repair/upgrade scripts
Defensive patterns

Strategy: try-catch

Try / catch

try {
  jobEntryShell.loadRep(rep, metaStore, idJobentry, databases, slaveServers);
} catch (KettleException e) {
  logError("Repository load failed for id_jobentry=" + idJobentry + ": " + e.getCause().getMessage(), e);
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/bbe3a6f31b431407. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/job/entries/shell/JobEntryShell.java:217

      setAppendLogfile = rep.getJobEntryAttributeBoolean( id_jobentry, "set_append_logfile" );
      addDate = rep.getJobEntryAttributeBoolean( id_jobentry, "add_date" );
      addTime = rep.getJobEntryAttributeBoolean( id_jobentry, "add_time" );
      logfile = rep.getJobEntryAttributeString( id_jobentry, "logfile" );
      logext = rep.getJobEntryAttributeString( id_jobentry, "logext" );
      logFileLevel = LogLevel.getLogLevelForCode( rep.getJobEntryAttributeString( id_jobentry, "loglevel" ) );
      insertScript = rep.getJobEntryAttributeBoolean( id_jobentry, "insertScript" );

      script = rep.getJobEntryAttributeString( id_jobentry, "script" );
      // How many arguments?
      int argnr = rep.countNrJobEntryAttributes( id_jobentry, "argument" );
      allocate( argnr );

      // Read them all...
      for ( int a = 0; a < argnr; a++ ) {
        arguments[a] = rep.getJobEntryAttributeString( id_jobentry, a, "argument" );
      }
    } catch ( KettleDatabaseException dbe ) {
      throw new KettleException( "Unable to load job entry of type 'shell' from the repository with id_jobentry="
        + id_jobentry, dbe );
    }
  }

  // Save the attributes of this job entry
  //
  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {
    try {
      rep.saveJobEntryAttribute( id_job, getObjectId(), "file_name", filename );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "work_directory", workDirectory );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "arg_from_previous", argFromPrevious );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "exec_per_row", execPerRow );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "set_logfile", setLogfile );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "set_append_logfile", setAppendLogfile );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "add_date", addDate );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "add_time", addTime );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "logfile", logfile );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "logext", logext );

View on GitHub (pinned to f3058517a1)