pentaho/pentaho-kettle · error · KettleException

ERROR_0003_Cannot_Save_Job_Entry

ERROR_0003_Cannot_Save_Job_Entry

Error message

JobEntryFileExists.ERROR_0003_Cannot_Save_Job_Entry

What it means

Thrown by JobEntryFileExists.saveRep when saving the 'filename' attribute of this job entry to the repository fails. The KettleDatabaseException is wrapped with a localized message carrying the job id. The entry was not persisted.

Solutions

  1. Retry the save after confirming repository DB availability
  2. Check DB write privileges for the repository user
  3. Inspect the wrapped KettleDatabaseException for the SQL error detail
  4. Resolve concurrent sessions editing the same job
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-save sanity: filename must be set and repository writable
if (filename == null || filename.isEmpty()) { throw new IllegalStateException("filename not set"); }

Try / catch

try {
    jobMeta.saveRep(rep, metaStore, id_job);
} catch (KettleException e) {
    logError("Save failed: " + e.getMessage(), e);
    // preserve JobMeta state and surface a retry to the user
}

Prevention

When it happens

Trigger: Calling saveRep during a job save when the repository insert/update of the 'filename' attribute throws KettleDatabaseException (connection failure, constraint, permissions).

Common situations: Repository DB unreachable; read-only credentials; duplicate/constraint violation in r_jobentry_attribute; concurrent edit conflicts.

Related errors


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

Appendix: source

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

        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() {
    return filename;
  }

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

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

View on GitHub (pinned to f3058517a1)