pentaho/pentaho-kettle · error · KettleException

JobMeta.Exception.UnableToSaveJobInRepositoryRollbackPerform…

Error message

JobMeta.Exception.UnableToSaveJobInRepositoryRollbackPerformed

What it means

Thrown by KettleDatabaseRepositoryJobDelegate.saveJob when a KettleDatabaseException occurs while saving a JobMeta to the database repository. The repository transaction is rolled back first (repository.rollback()), so no partial job rows remain, and the localized message (JobMeta.Exception.UnableToSaveJobInRepositoryRollbackPerformed) indicates the save failed and rollback was performed.

Solutions

  1. Inspect the chained KettleDatabaseException (dbe.getCause()) for the concrete SQL error
  2. Verify repository connectivity and retry the save after reconnecting
  3. Check that the repository schema version matches the Kettle version (upgrade if needed)
  4. Look for constraint violations (e.g. duplicate job name/path, oversized fields) and adjust the job or schema

Example fix

// before
repository.save( jobMeta, "/jobs/etl", monitor ); // rolls back on DB error
// after
try {
  repository.save( jobMeta, "/jobs/etl", monitor );
} catch ( KettleException e ) {
  log.error( "Job save rolled back. DB cause: " + e.getCause() );
  // fix DB issue (connectivity/schema/constraints) and re-save
}
Defensive patterns

Strategy: try-catch

Validate before calling

// pre-check schema compatibility and connectivity
repository.connect( ... );
// ensure target path exists
if ( repo.findDirectory( "/jobs" ) == null ) repo.createRepositoryDirectory( repo.getDirectory( "/" ), "jobs" );

Try / catch

try {
  repository.save( jobMeta, path, monitor );
} catch ( KettleException e ) {
  // library already rolled back; log e.getCause() (KettleDatabaseException/SQLException)
  // fix DB issue, then re-save jobMeta
}

Prevention

When it happens

Trigger: Calling repository.save(jobMeta, path, monitor) when a database error occurs during job insertion: connection failure, constraint violation, too-long field values, oversized job log table, or schema mismatch on r_job/r_jobentry tables.

Common situations: Repository RDBMS connection dropped during a large job save; job contains entries with data exceeding column widths; repository schema not upgraded to the current Kettle version; DB in read-only mode or out of space.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryJobDelegate.java:254

        JobHopMeta hi = jobMeta.getJobHop( i );
        saveJobHopMeta( hi, jobMeta.getObjectId() );
        if ( monitor != null ) {
          monitor.worked( 1 );
        }
      }

      saveJobParameters( jobMeta );

      // Commit this transaction!!
      repository.commit();

      jobMeta.clearChanged();
      if ( monitor != null ) {
        monitor.done();
      }
    } catch ( KettleDatabaseException dbe ) {
      repository.rollback();
      throw new KettleException( BaseMessages.getString(
        PKG, "JobMeta.Exception.UnableToSaveJobInRepositoryRollbackPerformed" ), dbe );
    }
  }

  /**
   * Save the parameters of this job to the repository.
   *
   * @param rep
   *          The repository to save to.
   *
   * @throws KettleException
   *           Upon any error.
   */
  private void saveJobParameters( JobMeta jobMeta ) throws KettleException {
    String[] paramKeys = jobMeta.listParameters();
    for ( int idx = 0; idx < paramKeys.length; idx++ ) {
      String desc = jobMeta.getParameterDescription( paramKeys[idx] );
      String defValue = jobMeta.getParameterDefault( paramKeys[idx] );

View on GitHub (pinned to f3058517a1)