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=

What it means

KettleException thrown by JobEntryWriteToFile.saveRep when saving the entry's attributes to the repository fails with a KettleDatabaseException. The message includes id_job and the DB error is chained. The entry configuration was not persisted.

Solutions

  1. Check repository connectivity and write permissions
  2. Inspect the chained KettleDatabaseException for the SQL failure cause
  3. Shorten content or verify column sizes match your data
  4. Retry the save after the repository is fixed

Example fix

// before
entry.saveRep(rep, metaStore, idJob); // throws
// after
try {
  entry.saveRep(rep, metaStore, idJob);
} catch (KettleException e) {
  logError("Cannot save write-to-file entry: " + e.getCause(), e);
}
Defensive patterns

Strategy: try-catch

Validate before calling

if (rep == null || idJob == null) throw new IllegalArgumentException("repository and id_job required");
if (content != null && content.length() > 1000000) throw new IllegalArgumentException("content exceeds repository column size");

Try / catch

try {
  entry.saveRep(rep, metaStore, idJob);
} catch (KettleException e) {
  logError("SaveRep failed: " + e.getCause(), e);
}

Prevention

When it happens

Trigger: Calling saveRep when the repository write fails — DB unavailable, read-only mode, constraint violation, or content exceeding column size.

Common situations: Saving during a repository outage; very large content values exceeding column limits; repository disk full; schema mismatch after upgrades.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/job/entries/writetofile/JobEntryWriteToFile.java:138

      createParentFolder = rep.getJobEntryAttributeBoolean( id_jobentry, "createParentFolder" );
      appendFile = rep.getJobEntryAttributeBoolean( id_jobentry, "appendFile" );
      content = rep.getJobEntryAttributeString( id_jobentry, "content" );
      encoding = rep.getJobEntryAttributeString( id_jobentry, "encoding" );
    } 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(), "createParentFolder", createParentFolder );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "appendFile", appendFile );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "content", content );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "encoding", encoding );
    } 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 void setContent( String content ) {
    this.content = content;
  }

  public String getContent() {
    return content;

View on GitHub (pinned to f3058517a1)