pentaho/pentaho-kettle · error · KettleException
GPLoadMeta.GetSQL.NoConnectionDefined
Error message
GPLoadMeta.GetSQL.NoConnectionDefined
What it means
verifyDatabaseConnection(), called from init(), throws a KettleException with key GPLoadMeta.GetSQL.NoConnectionDefined when the step's database meta is null, i.e., no database connection is selected for the target Greenplum/Postgres database.
Solutions
- Open the GPLoad step and select a valid database connection in the General tab.
- Recreate or re-import the missing shared database connection in the transformation metadata or repository.
- Edit the ktr XML to point the connection at an existing connection name.
- Validate the transformation before scheduling so init() failures surface before runtime.
Example fix
// before (ktr xml) <connection></connection> // after <connection>GreenplumDW</connection>
Defensive patterns
Strategy: validation
Validate before calling
if (meta.getDatabaseMeta() == null) {
throw new IllegalStateException("GPLoad step has no database connection selected");
} Try / catch
try {
init(smi, sdi);
} catch (KettleException ke) {
if (ke.getMessage().contains("NoConnectionDefined")) {
logError("Select a database connection in the GPLoad step", ke);
}
throw ke;
} Prevention
- Always select a database connection when configuring the GPLoad step
- Verify shared connections exist when copying steps between transformations
- Run transformation validation before scheduling
When it happens
Trigger: init() runs with meta.getDatabaseMeta() == null - the GPLoad step was saved without choosing a connection, or the referenced connection was deleted from the transformation/repository metadata.
Common situations: A partially configured GPLoad step; a shared database connection removed from the environment or repository; a ktr XML referencing a connection that no longer exists; copying steps between transformations without the shared connection.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- exceptionMessage
- ColumnExists.Error.TablenameFieldMissing
- Error while closing output
- Error while executing \'" + commandLine + "\'. Exit value =…
- GetSubFolders.Exception.CouldnotFindField
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/9cd0dbf2dc63fe13.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoad.java:644
output.writeLine( getInputRowMeta(), r );
}
putRow( getInputRowMeta(), r );
incrementLinesOutput();
} catch ( KettleException e ) {
logError( BaseMessages.getString( PKG, "GPLoad.Log.ErrorInStep" ) + e.getMessage() );
setErrors( 1 );
stopAll();
setOutputDone(); // signal end to receiver(s)
return false;
}
return true;
}
protected void verifyDatabaseConnection() throws KettleException {
if ( meta.getDatabaseMeta() == null ) {
throw new KettleException( BaseMessages.getString( PKG, "GPLoadMeta.GetSQL.NoConnectionDefined" ) );
}
}
public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {
meta = (GPLoadMeta) smi;
data = (GPLoadData) sdi;
Trans trans = getTrans();
preview = trans.isPreview();
if ( super.init( smi, sdi ) ) {
try {
verifyDatabaseConnection();
} catch ( KettleException ex ) {
logError( ex.getMessage() );
return false;
}View on GitHub (pinned to f3058517a1)