pentaho/pentaho-kettle · error · KettleTransException
Trans.Exception.ConnectionCouldNotBeFound
Error message
Trans.Exception.ConnectionCouldNotBeFound
What it means
Thrown by Trans.beginProcessing() when a dependent (previous-execution) log table database connection is configured but cannot be found among the transformation's available database connections. Kettle needs that connection to compute the max dependency date used to limit which log records are kept. Without it, the dependency-date calculation cannot proceed, so the transformation aborts startup.
Solutions
- Open the transformation's Logging settings, locate the log table with dependent entries, and recreate/fix the referenced database connection so its name matches an existing connection.
- Remove the dependent log table entry if the dependency-date pruning feature is not needed.
- Re-export or re-import the job/transformation with shared connections included so the connection metadata travels with it.
- Verify the connection name spelling/case in the transformation XML against the repository's connection list.
Example fix
// before (transformation XML references a connection that no longer exists) <dependent><connection>OLD_ETL_DB</connection>...</dependent> // after: fix the connection name in Log settings to an existing one <dependent><connection>ETL_DB</connection>...</dependent>
Defensive patterns
Strategy: validation
Validate before calling
// Before running, verify every connection referenced by the transformation exists
for (String connName : transMeta.getUsedDatabaseConnectionsNames()) {
if (transMeta.findDatabase(connName) == null)
throw new IllegalStateException("Missing database connection: " + connName);
} Try / catch
try {
trans.execute(null);
} catch (KettleTransException e) {
log.error("Log connection missing: " + e.getMessage(), e);
// fix metadata then retry
} Prevention
- Keep shared database connections in a central repository or metastore exported with every ktr/kjb.
- Run a metadata consistency check after every environment migration.
- Avoid renaming connections in one environment without updating dependent transformations.
When it happens
Trigger: beginProcessing() iterates the transLogTable's dependent log tables; if td.getDatabase() does not resolve to a defined DatabaseMeta (the else-branch where the connection lookup returns null), KettleTransException(ConnectionCouldNotBeFound, dbName) is thrown.
Common situations: Transformation log table configured with a 'dependent' log table referencing a database connection that was renamed or deleted in the kettle environment; importing a transformation XML/kjb that references a connection missing from the target repository; copying metadata between environments where shared connections are not exported.
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
- Trans.Exception.ErrorCalculatingDateRange
- Trans.Exception.ErrorWritingLogRecordToTable
- Trans.Exception.UnableToBeginProcessingTransformation
- Trans.Exception.UnableToWriteMetricsInformationToLogTable
- Trans.Exception.UnableToWriteStepInformationToLogTable
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/1e437b2b57b6e68c.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/Trans.java:2412
}
} else {
throw new KettleTransException( BaseMessages.getString( PKG,
"Trans.Exception.UnableToGetDependencyInfoFromDB", td.getDatabase().getName() + ".", td
.getTablename() + ".", td.getFieldname() ) );
}
} else {
throw new KettleTransException( BaseMessages.getString( PKG,
"Trans.Exception.UnableToGetDependencyInfoFromDB", td.getDatabase().getName() + ".", td
.getTablename() + ".", td.getFieldname() ) );
}
} catch ( KettleException e ) {
throw new KettleTransException( BaseMessages.getString( PKG, "Trans.Exception.ErrorInDatabase", "" + td
.getDatabase() ), e );
} finally {
depdb.close();
}
} else {
throw new KettleTransException( BaseMessages.getString( PKG, "Trans.Exception.ConnectionCouldNotBeFound",
"" + td.getDatabase() ) );
}
if ( log.isDetailed() ) {
log.logDetailed( BaseMessages.getString( PKG, "Trans.Log.Maxdepdate" ) + ( XMLHandler.date2string(
maxdepdate ) ) );
}
}
// OK, so we now have the maximum depdate;
// If it is larger, it means we have to read everything back in again.
// Maybe something has changed that we need!
//
if ( maxdepdate.getTime() > depDate.getTime() ) {
depDate = maxdepdate;
startDate = Const.MIN_DATE;
}
} else {
depDate = currentDate;View on GitHub (pinned to f3058517a1)