pentaho/pentaho-kettle · error · KettleDependencyException

This slave server is still in use by one or more…

Error message

This slave server is still in use by one or more transformations ({transCount}) or cluster schemas ({clusterCount}) :

What it means

Before deleting a slave server, KettleDatabaseRepository checks whether transformations or cluster schemas still reference it; if so it builds a message listing the dependents and throws a KettleDependencyException. This enforces referential integrity in the database repository so no dangling slave references are left behind.

Solutions

  1. Delete or update the referencing cluster schemas and transformations first, then delete the slave server.
  2. Reassign the transformations' slave references to another slave or remove the slave from cluster definitions in Spoon.
  3. Read the exception's dependent-name lists from the message to find exactly which objects to fix.
  4. If the references are stale, clean up the repository tables (R_SLAVE, cluster/transform link tables) carefully with a backup.

Example fix

// before
repo.deleteSlaveServer(slaveId); // still referenced
// after
for (ClusterSchema cs : repo.getClusterSchemas()) {
  cs.getSlaveServers().removeIf(s -> s.getObjectId().equals(slaveId));
  repo.save(cs, "remove slave", null, true);
}
repo.deleteSlaveServer(slaveId);
Defensive patterns

Strategy: try-catch

Validate before calling

boolean inUse = repo.getClusterSchemaIDs(slave.getObjectId()).length > 0; // and check transformations
if (inUse) { throw new IllegalStateException("Slave server still referenced; remove references first"); }

Try / catch

try {
  repo.deleteSlaveServer(slaveId);
} catch (KettleDependencyException e) {
  // parse dependent names from message, clean up cluster schemas/transformations, then retry
}

Prevention

When it happens

Trigger: Calling deleteSlaveServer(id) while r_slave/cluster tables still contain rows referencing the slave server (used by transformations or cluster schemas).

Common situations: Retiring a slave from a clustered Pentaho setup that is still referenced by cluster schemas; cleanup scripts deleting shared objects in the wrong order.

Understand the failure class

Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/KettleDatabaseRepository.java:1450

    } else {
      StringBuilder message = new StringBuilder( 100 );

      if ( transList.length > 0 ) {
        message.append( "Slave used by the following transformations:" ).append( Const.CR );
        for ( int i = 0; i < transList.length; i++ ) {
          message.append( "  " ).append( transList[i] ).append( Const.CR );
        }
        message.append( Const.CR );
      }
      if ( clustList.length > 0 ) {
        message.append( "Slave used by the following cluster schemas:" ).append( Const.CR );
        for ( int i = 0; i < clustList.length; i++ ) {
          message.append( "  " ).append( clustList[i] ).append( Const.CR );
        }
      }

      KettleDependencyException e = new KettleDependencyException( message.toString() );
      throw new KettleDependencyException( "This slave server is still in use by one or more transformations ("
        + transList.length + ") or cluster schemas (" + clustList.length + ") :", e );
    }
  }

  public synchronized void deletePartitionSchema( ObjectId id_partition_schema ) throws KettleException {
    partitionSchemaDelegate.delPartitionSchema( id_partition_schema );
    commit();
  }

  public synchronized void deleteClusterSchema( ObjectId id_cluster ) throws KettleException {
    clusterSchemaDelegate.delClusterSchema( id_cluster );
    commit();
  }

  public synchronized void deleteTransformation( ObjectId id_transformation ) throws KettleException {
    delTransNotes( id_transformation );
    delStepAttributes( id_transformation );
    delSteps( id_transformation );

View on GitHub (pinned to f3058517a1)