pentaho/pentaho-kettle · error · KettleException

Unable to save job entry of type 'unzip' to the repository…

Error message

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

What it means

JobEntryUnZip.saveRep() wraps a KettleDatabaseException from rep.saveJobEntryAttribute(...) into a KettleException with message "Unable to save job entry of type 'unzip' to the repository for id_job=" plus the id. The unzip entry's settings (including 'iffileexists' and 'setOriginalModificationDate') could not be persisted.

Solutions

  1. Confirm the repository user has write rights on R_JOBENTRY_ATTRIBUTE and the DB is writable.
  2. Inspect the cause KettleDatabaseException for the underlying SQL error and fix it (locks, constraints, space).
  3. Retry the save; if it persists, export the job as .kjb and reconnect to the repository.
  4. Restart Spoon to clear stale repository connections.

Example fix

// before: save without checking repository health
jobEntry.saveRep(rep, metaStore, id_job);
// after
if ( rep.isConnected() && rep.getActiveDatabaseMeta() != null ) {
  jobEntry.saveRep(rep, metaStore, id_job);
} else {
  throw new KettleException("Repository not connected");
}
Defensive patterns

Strategy: try-catch

Validate before calling

// Verify writable repository before saveRep
if ( !rep.isReadOnly() && rep.isConnected() ) {
  jobEntry.saveRep(rep, metaStore, id_job);
} else {
  throw new KettleException("Repository unavailable or read-only");
}

Type guard

boolean canPersist(Repository rep, ObjectId id_job) {
  return rep != null && rep.isConnected() && !rep.isReadOnly() && id_job != null;
}

Try / catch

try {
  jobEntry.saveRep(rep, metaStore, id_job);
} catch ( KettleException e ) {
  logError("Unzip entry save failed: " + e.getCause().getMessage(), e);
  jobMeta.saveXMLFile(backupPath); // preserve user work
  throw e;
}

Prevention

When it happens

Trigger: Calling saveRep(rep, metaStore, id_job) when the repository write fails: DB connection lost, constraint violation, insufficient privileges, or read-only repository schema.

Common situations: Repository DB read-only or full; network interruption while saving a job; locked attribute rows from a concurrent Spoon session; revoked write grants.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/job/entries/unzip/JobEntryUnZip.java:300

      rep.saveJobEntryAttribute( id_job, getObjectId(), "addfiletoresult", addfiletoresult );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "isfromprevious", isfromprevious );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "addtime", addtime );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "adddate", adddate );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "addOriginalTimestamp", addOriginalTimestamp );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "SpecifyFormat", SpecifyFormat );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "date_time_format", date_time_format );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "rootzip", rootzip );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "createfolder", createfolder );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "nr_limit", nr_limit );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "wildcardSource", wildcardSource );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "success_condition", success_condition );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "iffileexists", getIfFileExistsCode( iffileexist ) );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "create_move_to_directory", createMoveToDirectory );
      rep
        .saveJobEntryAttribute(
          id_job, getObjectId(), "setOriginalModificationDate", setOriginalModificationDate );
    } catch ( KettleDatabaseException dbe ) {
      throw new KettleException(
        "Unable to save job entry of type 'unzip' to the repository for id_job=" + id_job, dbe );
    }
  }

  public Result execute( Result previousResult, int nr ) {
    Result result = previousResult;
    result.setResult( false );
    result.setNrErrors( 1 );

    List<RowMetaAndData> rows = result.getRows();
    RowMetaAndData resultRow = null;

    String realFilenameSource = environmentSubstitute( zipFilename );
    String realWildcardSource = environmentSubstitute( wildcardSource );
    String realWildcard = environmentSubstitute( wildcard );
    String realWildcardExclude = environmentSubstitute( wildcardexclude );
    String realTargetdirectory = environmentSubstitute( sourcedirectory );
    String realMovetodirectory = environmentSubstitute( movetodirectory );

View on GitHub (pinned to f3058517a1)