pentaho/pentaho-kettle · error · KettleException

ERROR_0003_Cannot_Save_Job_Entry

ERROR_0003_Cannot_Save_Job_Entry

Error message

JobEntryTalendJobExec.ERROR_0003_Cannot_Save_Job_Entry

What it means

Thrown by JobEntryTalendJobExec.saveRep when persisting the Talend job entry's attributes (filename, class_name) to the Kettle repository fails with a KettleDatabaseException. It wraps the low-level database error with the job's ObjectId for context. It indicates the repository storage layer rejected the write, not a problem with the Talend job itself.

Solutions

  1. Verify the repository database connection and retry the save operation
  2. Check the repository schema is fully migrated (R_JOBENTRY_ATTRIBUTE exists and is writable)
  3. Ensure the job entry has a valid ObjectId (it has been added to a saved job) before saveRep
  4. Inspect the wrapped KettleDatabaseException cause for the specific SQL error and fix permissions/constraints accordingly

Example fix

// before
jobEntry.saveRep( rep, metaStore, id_job ); // fails with ERROR_0003
// after
if ( rep != null && rep.isConnected() ) {
  rep.connect( envUser, envPass );
  jobEntry.saveRep( rep, metaStore, id_job );
}
Defensive patterns

Strategy: try-catch

Validate before calling

if ( rep == null || !rep.isConnected() ) { throw new IllegalStateException( "Repository not connected" ); }

Try / catch

try { jobEntry.saveRep( rep, metaStore, id_job ); } catch ( KettleException e ) { log.error( "Failed to save Talend job entry " + id_job, e.getCause() ); throw e; }

Prevention

When it happens

Trigger: Calling saveRep on a JobEntryTalendJobExec when the repository connection is broken, the R_JOBENTRY_ATTRIBUTE table is missing/corrupt, or a repository-level constraint (e.g. null/oversized attribute value) is violated while saving 'filename' or 'class_name'.

Common situations: Saving a job to a database repository whose connection dropped mid-save; a mis-migrated Pentaho repository schema missing job entry attribute tables; saving before the entry has been assigned an ObjectId; database permissions revoked on the repository tables.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/job/entries/talendjobexec/JobEntryTalendJobExec.java:126

  }

  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" );
      className = rep.getJobEntryAttributeString( id_jobentry, "class_name" );
    } catch ( KettleException dbe ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "JobEntryTalendJobExec.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 );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "class_name", className );
    } catch ( KettleDatabaseException dbe ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "JobEntryTalendJobExec.ERROR_0003_Cannot_Save_Job_Entry", id_job ), dbe );
    }
  }

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

  public String getFilename() {
    return filename;
  }

  public String getRealFilename() {
    return environmentSubstitute( getFilename() );
  }

  public Result execute( Result previousResult, int nr ) {
    Result result = previousResult;

View on GitHub (pinned to f3058517a1)