pentaho/pentaho-kettle · error · KettleException

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

Error message

Unable to save job entry of type 'create Folder' to the repository for id_job=

What it means

Thrown by JobEntryFolderIsEmpty.saveRep when saving the entry's attributes (foldername, include_subfolders, specify_wildcard, wildcard) to the repository fails with a KettleDatabaseException. The exception is wrapped with the id_job for identification. It means the 'Folder is empty' job entry state could not be persisted.

Solutions

  1. Check the cause KettleDatabaseException for the underlying SQL error and fix the repository DB (connectivity, locks, constraints).
  2. Verify the repository is writable and the user has INSERT/UPDATE rights on r_jobentry_attribute.
  3. Retry the save after restoring the DB connection; the job in memory is still intact.
  4. As a workaround, export the job to XML (file) instead of the repository.

Example fix

// before
jobEntry.saveRep(rep, metaStore, idJob);
// after
try {
  jobEntry.saveRep(rep, metaStore, idJob);
} catch (KettleException e) {
  logError("Save failed for id_job=" + idJob + ": " + e.getCause().getMessage());
  // prompt user to check repository connection, then retry
}
Defensive patterns

Strategy: try-catch

Validate before calling

// ensure repository is reachable and writable before saving
if (!rep.connect()) {
  throw new KettleException("Repository not connected; cannot save job");
}

Try / catch

try {
  entry.saveRep(rep, metaStore, idJob);
} catch (KettleException e) {
  logError("Save failed: " + e.getCause().getMessage());
  // offer XML export fallback and retry after reconnect
}

Prevention

When it happens

Trigger: Calling saveRep on a JobEntryFolderIsEmpty when rep.saveJobEntryAttribute throws KettleDatabaseException — e.g. repository DB down, constraint violation, read-only repository, or transaction rollback during job save.

Common situations: Repository database connection lost while saving a job in Spoon; repository storage full or locked; saving to a read-only replica; schema mismatch after a Pentaho upgrade.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/job/entries/folderisempty/JobEntryFolderIsEmpty.java:134

      foldername = rep.getJobEntryAttributeString( id_jobentry, "foldername" );
      includeSubfolders = rep.getJobEntryAttributeBoolean( id_jobentry, "include_subfolders" );
      specifywildcard = rep.getJobEntryAttributeBoolean( id_jobentry, "specify_wildcard" );
      wildcard = rep.getJobEntryAttributeString( id_jobentry, "wildcard" );
    } catch ( KettleException dbe ) {
      throw new KettleException(
        "Unable to load job entry of type 'create Folder' 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(), "foldername", foldername );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "include_subfolders", includeSubfolders );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "specify_wildcard", specifywildcard );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "wildcard", wildcard );
    } catch ( KettleDatabaseException dbe ) {
      throw new KettleException( "Unable to save job entry of type 'create Folder' to the repository for id_job="
        + id_job, dbe );
    }
  }

  public void setSpecifyWildcard( boolean specifywildcard ) {
    this.specifywildcard = specifywildcard;
  }

  public boolean isSpecifyWildcard() {
    return specifywildcard;
  }

  public void setFoldername( String foldername ) {
    this.foldername = foldername;
  }

  public String getFoldername() {
    return foldername;

View on GitHub (pinned to f3058517a1)