pentaho/pentaho-kettle · error · KettleException

Unable to load job entry copy from repository with…

Error message

Unable to load job entry copy from repository with id_jobentry_copy=jobEntryCopyId

What it means

While loading a job entry copy from the database repository, a KettleDatabaseException (SQL/JDBC-level failure) occurred. The id_jobentry_copy is wrapped into a KettleException with cause attached so the underlying database error is preserved.

Solutions

  1. Inspect the wrapped KettleDatabaseException cause for the real SQL error and fix the database issue (connectivity, locks, schema)
  2. Verify the repository schema is installed/updated for this Pentaho version (run the repository SQL scripts or Repository Connect upgrade)
  3. Test repository connectivity before bulk loads and retry transient failures
  4. Check DB logs for deadlocks or lock waits on R_JOBENTRY_COPY

Example fix

// catch and surface the cause
try {
  JobEntryCopy c = repository.jobEntryDelegate.loadJobEntryCopy(jobId, copyId, jobMeta);
} catch (KettleException e) {
  if (e.getCause() instanceof KettleDatabaseException) {
    logError("Repository DB failure loading entry " + copyId, e.getCause().getCause());
  }
}
Defensive patterns

Strategy: retry

Validate before calling

null

Type guard

null

Try / catch

try { ... } catch (KettleException e) {
  Throwable c = e.getCause();
  if (c instanceof KettleDatabaseException) { /* retry with backoff or fail fast with DB diagnostics */ }
}

Prevention

When it happens

Trigger: Any database failure during the SELECT of the R_JOBENTRY_COPY row: connection loss, locked tables, bad schema, missing table after failed repository install.

Common situations: Repository database down or network blip mid-load; schema mismatch after partial repository upgrade; DB connection pool exhausted; deadlock/timeout on the 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/4b3a78df3fcfead1. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryJobEntryDelegate.java:184

                + jet_code + "]." );
            }
          } else {
            throw new KettleException( "Unable to find Job Entry Type with id="
              + jobEntryTypeId + " in the repository" );
          }
        }

        jobEntryCopy.setLocation( locx, locy );
        jobEntryCopy.setDrawn( isdrawn );
        jobEntryCopy.setLaunchingInParallel( isparallel );

        return jobEntryCopy;
      } else {
        throw new KettleException( "Unable to find job entry copy in repository with id_jobentry_copy="
          + jobEntryCopyId );
      }
    } catch ( KettleDatabaseException dbe ) {
      throw new KettleException( "Unable to load job entry copy from repository with id_jobentry_copy="
        + jobEntryCopyId, dbe );
    }
  }

  @SuppressWarnings( "deprecation" )
  private void compatibleJobEntryLoadRep( JobEntryInterface jobEntry, KettleDatabaseRepository repository,
    ObjectId id_jobentry_type, List<DatabaseMeta> databases, List<SlaveServer> slaveServers ) throws KettleException {

    jobEntry.loadRep( repository, id_jobentry_type, databases, slaveServers );

  }

  public void saveJobEntryCopy( JobEntryCopy copy, ObjectId id_job, KettleDatabaseRepositoryMetaStore metaStore ) throws KettleException {
    try {
      JobEntryInterface entry = copy.getEntry();
      /*
       * --1-- Save the JobEntryCopy details... --2-- If we don't find a id_jobentry, save the jobentry (meaning: only
       * once)

View on GitHub (pinned to f3058517a1)