pentaho/pentaho-kettle · error · KettleException
MonetDBBulkLoaderMeta.Exception.ConnectionNotDefined
MonetDBBulkLoaderMeta.Exception.ConnectionNotDefined
Error message
MonetDBBulkLoaderMeta.Exception.ConnectionNotDefined
What it means
MonetDBBulkLoaderMeta.getRequiredFields() throws this KettleException when the step's databaseMeta reference is null, i.e. no database connection has been defined for the MonetDB Bulk Loader step. Without a DatabaseMeta the step cannot connect to MonetDB to look up the target table's field metadata, so it fails fast instead of attempting a connect with a null connection. This is thrown during metadata validation/preview flows (getFields/getRequiredFields), typically when a transformation is run or its step dialog is validated with the connection setting unset.
Solutions
- Open the MonetDB Bulk Loader step dialog and select/create a Database Connection, then re-run or re-validate the transformation.
- If constructing the step in code, set the connection before use, e.g. meta.setDatabaseMeta(transMeta.findDatabase("MonetDB")), and verify findDatabase returned non-null.
- Check the transformation XML/repository for a missing or dangling <connection> reference and re-link it.
- Add a pre-transformation check or validation that the step's connection is defined before preview/execute.
Example fix
// before
MonetDBBulkLoaderMeta meta = new MonetDBBulkLoaderMeta();
meta.getFields(...); // throws ConnectionNotDefined
// after
MonetDBBulkLoaderMeta meta = new MonetDBBulkLoaderMeta();
DatabaseMeta dbMeta = transMeta.findDatabase("MonetDBLocal");
if (dbMeta == null) {
throw new KettleException("MonetDB connection not defined");
}
meta.setDatabaseMeta(dbMeta);
meta.getFields(...); Defensive patterns
Strategy: validation
Validate before calling
// Java (PDI plugin API)
MonetDBBulkLoaderMeta meta = ...;
if (meta.getDatabaseMeta() == null) {
throw new KettleException("MonetDB Bulk Loader: no database connection defined");
}
// alternatively check via transMeta:
// if (transMeta.findDatabase(connName) == null) { ... fail early ... } Prevention
- Always set the Database Connection field in the step dialog before previewing or saving.
- When generating transformations programmatically, assert meta.getDatabaseMeta() != null before getFields/validation.
- Validate that connections referenced by transformation XML still exist in the repository/environment.
- Add a step-level validation pass before executing shared/reused transformations.
When it happens
Trigger: Calling getRequiredFields(VariableSpace) (directly or via Spoon preview/validation) on a MonetDBBulkLoaderMeta whose databaseMeta field is null — the step was saved or constructed without selecting a database connection.
Common situations: Loading a transformation XML/kettle repository where the connection element is missing or failed to resolve; building the step programmatically without calling setDatabaseMeta(); a cloned/copied step metadata that lost its database reference; upgrading or migrating transformations where the connection was deleted from the repository.
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
- AccessInputMeta.Exception.ErrorReadingRepository
- AggregateRowsMeta.Exception.UnexpectedErrorWhileReadingStepInfo
- AggregateRowsMeta.Exception.UnableToLoadStepInfo
- AggregateRowsMeta.Exception.UnableToSaveStepInfo
- An error was detected in the step attributes' definition…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/18decc4b3c455516.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/monet-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/monetdbbulkloader/MonetDBBulkLoaderMeta.java:797
// Check if this table exists...
if ( db.checkTableExists( schemaTable ) ) {
return db.getTableFields( schemaTable );
} else {
throw new KettleException( BaseMessages.getString(
PKG, "MonetDBBulkLoaderMeta.Exception.TableNotFound" ) );
}
} else {
throw new KettleException( BaseMessages.getString(
PKG, "MonetDBBulkLoaderMeta.Exception.TableNotSpecified" ) );
}
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString(
PKG, "MonetDBBulkLoaderMeta.Exception.ErrorGettingFields" ), e );
} finally {
db.close();
}
} else {
throw new KettleException( BaseMessages.getString(
PKG, "MonetDBBulkLoaderMeta.Exception.ConnectionNotDefined" ) );
}
}
/**
* @return the schemaName
*/
public String getSchemaName() {
return schemaName;
}
/**
* @param schemaName the schemaName to set
*/
public void setSchemaName( String schemaName ) {
this.schemaName = schemaName;
}View on GitHub (pinned to f3058517a1)