pentaho/pentaho-kettle · error · KettleException

ERROR_0002

ERROR_0002

Error message

JobEntryPGPVerify.ERROR_0002_Cannot_Load_Job_From_Repository

What it means

JobEntryPGPVerify.loadRep wraps any KettleException raised while reading the entry's attributes (gpglocation, filename, detachedfilename, useDetachedSignature) from the repository into a KettleException with ERROR_0002 'Cannot load job from repository' plus the id_jobentry. The original database exception is the cause. It means repository-based deserialization of this job entry failed.

Solutions

  1. Read the cause (KettleDatabaseException) to identify the underlying DB error and fix connectivity or corruption
  2. Verify attribute rows exist for the id_jobentry; re-save the entry from Spoon to rewrite them
  3. Check repository schema version vs Pentaho version and apply upgrade scripts

Example fix

// before
entry.loadRep(rep, metaStore, idJobentry, databases, slaveServers);
// after
try {
  entry.loadRep(rep, metaStore, idJobentry, databases, slaveServers);
} catch (KettleException e) {
  logError("Cannot load PGP verify entry " + idJobentry + " from repo: " + e.getCause(), e);
}
Defensive patterns

Strategy: try-catch

Validate before calling

// before loadRep
if (id_jobentry == null || rep == null) throw new KettleException("No repository id for job entry");

Try / catch

try {
  entry.loadRep(rep, metaStore, idJobentry, databases, slaveServers);
} catch (KettleException e) {
  logError("Cannot load PGP verify entry " + idJobentry + ": " + e.getCause(), e);
  // repair rows or recreate the entry
}

Prevention

When it happens

Trigger: Calling loadRep (directly or through repository job load) when rep.getJobEntryAttributeString/Boolean throws KettleException: DB connection failure, missing/corrupt r_jobentry_attribute rows, or schema mismatch.

Common situations: Repository schema drifted after an upgrade so 'useDetachedSignature' or other columns/keys are absent; DB outage while opening a job; orphaned job entry with no attribute rows.

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/4f0e26f344a111a0. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/job/entries/pgpverify/JobEntryPGPVerify.java:118

      filename = XMLHandler.getTagValue( entrynode, "filename" );
      detachedfilename = XMLHandler.getTagValue( entrynode, "detachedfilename" );
      useDetachedSignature = "Y".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, "useDetachedSignature" ) );

    } catch ( KettleXMLException xe ) {
      throw new KettleXMLException( BaseMessages.getString(
        PKG, "JobEntryPGPVerify.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 {
      gpglocation = rep.getJobEntryAttributeString( id_jobentry, "gpglocation" );
      filename = rep.getJobEntryAttributeString( id_jobentry, "filename" );
      detachedfilename = rep.getJobEntryAttributeString( id_jobentry, "detachedfilename" );
      useDetachedSignature = rep.getJobEntryAttributeBoolean( id_jobentry, "useDetachedSignature" );
    } catch ( KettleException dbe ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "JobEntryPGPVerify.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(), "gpglocation", gpglocation );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "filename", filename );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "detachedfilename", detachedfilename );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "useDetachedSignature", useDetachedSignature );
    } catch ( KettleDatabaseException dbe ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "JobEntryPGPVerify.ERROR_0003_Cannot_Save_Job_Entry", id_job ), dbe );
    }
  }

  public void setGPGLocation( String gpglocation ) {
    this.gpglocation = gpglocation;

View on GitHub (pinned to f3058517a1)