pentaho/pentaho-kettle · error · KettleException

Unable to delete object with id [

Error message

Unable to delete object with id [

What it means

delecte flow: the repository attempted pur.deleteFile(id, true, null) to permanently delete a repository object and any exception was wrapped as this KettleException. It means the object with the given id could not be deleted in the PUR repository.

Solutions

  1. Confirm the object still exists before deleting; treat 'not found' as success in idempotent flows.
  2. Check the caller's delete permissions on the containing folder.
  3. Inspect e.getCause() for the server-side reason and resolve it (locks, references).
  4. Retry after re-authenticating if the session expired.

Example fix

// before
repo.deleteObject(id);
// after
try {
  repo.deleteObject(id);
} catch (KettleException e) {
  if (e.getCause() != null && String.valueOf(e.getCause()).contains("not found")) {
    log.info("Already deleted: {}", id);
  } else throw e;
}
Defensive patterns

Strategy: try-catch

Validate before calling

if (repo.getObjectId(id) == null) { log.info("Object {} already gone", id); return; }

Type guard

null

Try / catch

try {
  repo.deleteObject(id);
} catch (KettleException e) {
  log.error("Delete of {} failed: {}", id, e.getCause(), e);
  throw e;
}

Prevention

When it happens

Trigger: Calling the delete API (deleteObject-like method at this site) with an ObjectId whose backing file cannot be deleted — missing file, insufficient permissions, referential locks, or PUR service error. The write lock is held during deletion.

Common situations: Deleting an object already removed by another user; lacking delete permission on the folder; server-side references (job/trans dependencies) preventing deletion; expired session.

Related errors


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

Appendix: source

Thrown at plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java:868

    removeFromSharedObjectCache( RepositoryObjectType.CLUSTER_SCHEMA, idCluster );
  }

  @Override
  public void deleteJob( ObjectId idJob ) throws KettleException {
    deleteFileById( idJob );
  }

  protected void permanentlyDeleteSharedObject( final ObjectId id ) throws KettleException {
    try {
      readWriteLock.writeLock().lock();
      try {
        pur.deleteFile( id.getId(), true, null );
      } finally {
        readWriteLock.writeLock().unlock();
      }

    } catch ( Exception e ) {
      throw new KettleException( "Unable to delete object with id [" + id + "]", e );
    }
  }

  public void deleteFileById( final ObjectId id ) throws KettleException {
    try {
      readWriteLock.writeLock().lock();
      try {
        pur.deleteFile( id.getId(), null );
      } finally {
        readWriteLock.writeLock().unlock();
      }

      rootRef.clearRef();
    } catch ( Exception e ) {
      throw new KettleException( "Unable to delete object with id [" + id + "]", e );
    }
  }

View on GitHub (pinned to f3058517a1)