pentaho/pentaho-kettle · error · KettleException

ERROR_0002_Cannot_Load_Job_From_Repository

ERROR_0002_Cannot_Load_Job_From_Repository

Error message

JobEntryFileExists.ERROR_0002_Cannot_Load_Job_From_Repository

What it means

Thrown by JobEntryFileExists.loadRep when reading the 'filename' attribute of this job entry from a repository fails. The KettleException is wrapped with a localized message including the entry ObjectId. It indicates a repository read failure for this entry's attributes.

Solutions

  1. Test repository connectivity and reload the job
  2. Verify r_jobentry_attribute contains a 'filename' row for this id_jobentry
  3. Run repository upgrade scripts if the Kettle version changed
  4. Re-save the entry from Spoon to recreate the rows
Defensive patterns

Strategy: try-catch

Validate before calling

// Confirm the entry has attribute rows before load
long n = rep.countNumJobEntryAttributes(id_jobentry);
if (n == 0) { throw new IllegalStateException("entry " + id_jobentry + " has no attributes"); }

Try / catch

try {
    jobEntry.loadRep(rep, metaStore, id_jobentry, databases, slaveServers);
} catch (KettleException e) {
    logError("Repository load failed for entry " + id_jobentry + ": " + e.getMessage(), e);
    // reconnect/retry or fall back to XML
}

Prevention

When it happens

Trigger: Loading a job from a database repository when getJobEntryAttributeString(id_jobentry, "filename") throws — missing rows, dead connection, or repository API error.

Common situations: Repository schema mismatch after upgrade; orphaned job entry without attribute rows; transient DB outage while opening a job.

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/4187062c90d3c346. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/job/entries/fileexists/JobEntryFileExists.java:104

  }

  public void loadXML( Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers,
    Repository rep, IMetaStore metaStore ) throws KettleXMLException {
    try {
      super.loadXML( entrynode, databases, slaveServers );
      filename = XMLHandler.getTagValue( entrynode, "filename" );
    } catch ( KettleXMLException xe ) {
      throw new KettleXMLException( BaseMessages.getString(
        PKG, "JobEntryFileExists.ERROR_0001_Cannot_Load_Job_Entry_From_Xml_Node" ), xe );
    }
  }

  public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,
    List<SlaveServer> slaveServers ) throws KettleException {
    try {
      filename = rep.getJobEntryAttributeString( id_jobentry, "filename" );
    } catch ( KettleException dbe ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "JobEntryFileExists.ERROR_0002_Cannot_Load_Job_From_Repository", id_jobentry ), dbe );
    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {
    try {
      rep.saveJobEntryAttribute( id_job, getObjectId(), "filename", filename );
    } catch ( KettleDatabaseException dbe ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "JobEntryFileExists.ERROR_0003_Cannot_Save_Job_Entry", id_job ), dbe );
    }
  }

  public void setFilename( String filename ) {
    this.filename = filename;
  }

  public String getFilename() {

View on GitHub (pinned to f3058517a1)