pentaho/pentaho-kettle · error · KettleStepException
GetSequence.Exception.CouldNotFindNextValueForSequence
Error message
GetSequence.Exception.CouldNotFindNextValueForSequence
What it means
GetSlaveSequence.addSequence throws KettleStepException with 'CouldNotFindNextValueForSequence' when it cannot obtain the next value from the slave server's named sequence. The step asks a remote slave server for the next sequence value; if the slave server is unknown, unreachable, or the sequence name is missing/invalid, no value can be produced and the step aborts the row. The target field name is appended to the message for diagnostics.
Solutions
- Verify the slave server named in the step exists and is reachable (Tools > Slave servers / cluster schema).
- Confirm the sequence name is created/registered on the slave server.
- Check the increment value configured in the step is a positive number.
- Run the transformation on the master with the cluster enabled so the slave dispatcher is initialized.
Example fix
// before: step references stale slave slaveServerName = "old-slave"; // removed from config // after: point to a defined, reachable slave slaveServerName = "slave-1"; // exists in cluster schema
Defensive patterns
Strategy: validation
Validate before calling
// Before running the transformation, verify slave + sequence config GetSlaveSequenceMeta m = (GetSlaveSequenceMeta) stepMeta.getStepMetaInterface(); if ( m.getSlaveServerName() == null || m.getSlaveServerName().isEmpty() ) throw new IllegalStateException( "Get slave sequence step has no slave server configured" ); if ( m.getSequenceName() == null || m.getSequenceName().isEmpty() ) throw new IllegalStateException( "Get slave sequence step has no sequence name configured" );
Try / catch
try {
trans.execute( null );
} catch ( KettleException e ) {
if ( e.getMessage() != null && e.getMessage().contains( "CouldNotFindNextValueForSequence" ) ) {
// check slave server availability and sequence existence, then re-run
} else throw e;
} Prevention
- Define all slave servers in the cluster schema and health-check them before runs
- Create the named sequence on every slave before deploying the transformation
- Keep sequence names in variables/parameters validated at job level
- Test clustered transformations with a single row before production runs
When it happens
Trigger: processRow -> addSequence calls meta.getSlaveServerName()/sequence lookup and the returned next value is null/unavailable; slave server not defined in the cluster run configuration; sequence name does not exist on the slave.
Common situations: Running a clustered transformation where the slave server was removed or renamed; typo in the sequence name; slave's sequence service not running; using the step in a non-clustered run where no slave is available.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- JobTrans.Exception.UnableToFindRemoteSlaveServer
- AddSequence.Exception.CouldNotFindNextValueForSequence
- AddSequence.Exception.NoSpecifiedMethod
- API coding error: please specify the conversion metadata…
- Calculator.Error.NoNameField
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/e86ec62242a6b69e.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/getslavesequence/GetSlaveSequence.java:71
if ( data.value >= ( data.startValue + data.increment ) ) {
// Get a new value from the service...
//
data.startValue = data.slaveServer.getNextSlaveSequenceValue( data.sequenceName, data.increment );
data.value = data.startValue;
}
next = Long.valueOf( data.value );
data.value++;
if ( next != null ) {
Object[] outputRowData = inputRowData;
if ( inputRowData.length < inputRowMeta.size() + 1 ) {
outputRowData = RowDataUtil.resizeArray( inputRowData, inputRowMeta.size() + 1 );
}
outputRowData[inputRowMeta.size()] = next;
return outputRowData;
} else {
throw new KettleStepException( BaseMessages.getString(
PKG, "GetSequence.Exception.CouldNotFindNextValueForSequence" )
+ meta.getValuename() );
}
}
public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException {
meta = (GetSlaveSequenceMeta) smi;
data = (GetSlaveSequenceData) sdi;
Object[] r = getRow(); // Get row from input rowset & set row busy!
if ( r == null ) { // no more input to be expected...
setOutputDone();
return false;
}
if ( first ) {
first = false;View on GitHub (pinned to f3058517a1)