pentaho/pentaho-kettle · error · KettleException

Unable to save job entry of type 'create file' to the…

Error message

Unable to save job entry of type 'create file' to the repository for id_job=${id_job}

What it means

JobEntryCreateFile.saveRep throws this KettleException when persisting the 'create file' entry's attributes to the repository fails for the given id_job. It wraps KettleDatabaseException thrown by rep.saveJobEntryAttribute calls.

Solutions

  1. Verify repository connectivity and retry saving the job.
  2. Ensure the repository user has write permissions and the DB is writable.
  3. Shorten the filename value if it may exceed repository column limits.
  4. Check the chained KettleDatabaseException for the exact SQL failure.
Defensive patterns

Strategy: try-catch

Validate before calling

if (filename != null && filename.length() > 2000) throw new IllegalArgumentException("filename exceeds repository column size");
if (!rep.isConnected()) throw new IllegalStateException("Repository must be connected before saveRep");

Try / catch

try {
  jobEntry.saveRep(rep, metaStore, id_job);
} catch (KettleException e) {
  logError("Repo save failed for create-file entry, id_job=" + id_job + ": " + e.getCause(), e);
  // surface to user and offer retry; in-memory job is unaffected
}

Prevention

When it happens

Trigger: Calling saveRep when saving 'filename', 'fail_if_file_exists' or 'add_filename_result' to the repository fails — lost DB connection, constraint violations, read-only repository, or invalid job object id.

Common situations: Network interruption while saving a job to a remote repository DB; database quota/disk full; filenames longer than the VALUE_STR column; user lacking repository write privileges.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/job/entries/createfile/JobEntryCreateFile.java:126

    try {
      filename = rep.getJobEntryAttributeString( id_jobentry, "filename" );
      failIfFileExists = rep.getJobEntryAttributeBoolean( id_jobentry, "fail_if_file_exists" );
      addfilenameresult = rep.getJobEntryAttributeBoolean( id_jobentry, "add_filename_result" );

    } catch ( KettleException dbe ) {
      throw new KettleException(
        "Unable to load job entry of type 'create file' from the repository for id_jobentry=" + 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(), "fail_if_file_exists", failIfFileExists );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "add_filename_result", addfilenameresult );

    } catch ( KettleDatabaseException dbe ) {
      throw new KettleException( "Unable to save job entry of type 'create file' to the repository for id_job="
        + 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 ) throws KettleException {
    Result result = previousResult;

View on GitHub (pinned to f3058517a1)