pentaho/pentaho-kettle · error · KettleException
MonetDBBulkLoaderMeta.Exception.ErrorGettingFields
MonetDBBulkLoaderMeta.Exception.ErrorGettingFields
Error message
MonetDBBulkLoaderMeta.Exception.ErrorGettingFields
What it means
MonetDBBulkLoaderMeta wraps any failure during the database field-discovery sequence (connect, checkTableExists, getTableFields) in a KettleException carrying 'ErrorGettingFields'. It indicates metadata about the target table's columns could not be retrieved; the original exception is preserved as the cause. The database connection is closed in a finally block.
Solutions
- Inspect the cause chain for the underlying KettleDatabaseException/SQLException and fix that (connectivity, credentials, or SQL)
- Test the step's database connection in Spoon (Test button) to isolate connection vs metadata issues
- Confirm the MonetDB JDBC driver is on the classpath and the server is reachable from the PDI host
- Verify the user has SELECT/metadata privileges on the schema.table
Example fix
// before
Database db = new Database(loggingObject, databaseMeta);
db.connect();
RowMetaInterface fields = meta.getTableFields();
// after
try {
meta.getTableFields();
} catch (KettleException e) {
logError("Could not read fields from target table: " + e.getCause(), e);
throw e;
} finally {
db.disconnect();
} Defensive patterns
Strategy: try-catch
Validate before calling
// Test connectivity before field discovery
DatabaseMeta dbm = meta.getDatabaseMeta();
if (dbm == null) throw new KettleException("No database connection configured");
Database test = new Database(parentLoggingObject, dbm);
test.connect();
test.disconnect(); Try / catch
try {
RowMetaInterface rmi = meta.getTableFields();
} catch (KettleException e) {
Throwable c = e.getCause();
if (c instanceof KettleDatabaseException) {
// connection/SQL problem: check host, port, credentials, driver
}
throw e;
} Prevention
- Use the Test Connection button in the database dialog before designing steps
- Ensure the MonetDB JDBC driver is installed in lib/ or the plugin's lib directory
- Whitelist the MonetDB port on firewalls between PDI and the database
- Grant the connecting user metadata SELECT privileges on the target schema
When it happens
Trigger: Any Exception thrown inside the try block — connection failure to MonetDB, authentication failure, SQL error from getTableFields, or the TableNotFound/TableNotSpecified KettleExceptions — is re-wrapped as this error.
Common situations: MonetDB server down or wrong host/port in the connection; wrong username/password; insufficient privileges to read table metadata; JDBC driver missing; network/firewall blocking the port.
Understand the failure class
Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.
Related errors
- Database.Exception.EmptyConnectionError
- DimensionLookupMeta.Exception.UnableToRetrieveDataTypeOfRetu…
- An error occurred writing data to the MonetDB API (MAPI)…
- Database connection not found:
- Database.Exception.UnableToGetMetadata
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/7f3c15f24898ba17.
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:791
try {
db.connect();
if ( !Utils.isEmpty( realTableName ) ) {
String schemaTable = databaseMeta.getQuotedSchemaTableCombination( realSchemaName, realTableName );
// 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;
}
View on GitHub (pinned to f3058517a1)