pentaho/pentaho-kettle · error · KettleException
GPBulkLoaderMeta.Exception.ErrorGettingFields
Error message
GPBulkLoaderMeta.Exception.ErrorGettingFields
What it means
Wrapping error thrown by GPBulkLoaderMeta.getRequiredFields: any exception while connecting to the database, checking the table, or reading its field metadata is caught and rethrown as KettleException with the localized ErrorGettingFields message, chained to the original cause. It masks the low-level failure (connection, SQL, driver issues) behind a uniform message.
Solutions
- Inspect getCause() for the real error (connect vs SQL) and fix accordingly
- Test the database connection in Spoon (Test button) before running getRequiredFields
- Verify the JDBC driver jar is on the classpath
- Check privileges of the repository/runtime user on the target table
Defensive patterns
Strategy: try-catch
Validate before calling
// test the connection first
Database db = new Database( loggingObject, databaseMeta );
try { db.connect(); db.disconnect(); } catch ( KettleDatabaseException e ) {
throw new IllegalStateException( "DB connection unusable: " + e.getMessage(), e );
} Try / catch
try { meta.getRequiredFields( transMeta ); } catch ( KettleException e ) { log.error( "getRequiredFields failed: " + e.getCause(), e ); } Prevention
- Always unwrap getCause() — the ErrorGettingFields message hides the real fault
- Use the connection Test button before running
- Ship the Greenplum/PostgreSQL JDBC driver with your distribution
- Grant the runtime user DESCRIBE/SELECT rights on target tables
When it happens
Trigger: getRequiredFields fails inside its try block — e.g. Database.connect throws (bad host/credentials), checkTableExists or getTableFields raises a SQL error, or the driver class is missing.
Common situations: Database unreachable/firewalled; wrong JDBC credentials; missing PostgreSQL/Greenplum JDBC driver in classpath; table exists but user lacks privileges to describe it.
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
- Error evaluating Internet address value metadata
- Error updating batch
- GPBulkLoaderMeta.Exception.ErrorGettingFields
- LucidDBStreamingLoaderMeta.Exception.ErrorGettingFields
- MySQLBulkLoaderMeta.Exception.ErrorGettingFields
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/f1ca5f6cc585fe77.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/gp-bulk-loader/core/src/main/java/org/pentaho/di/trans/steps/gpbulkloader/GPBulkLoaderMeta.java:677
if ( databaseMeta != null ) {
Database db = new Database( loggingObject, databaseMeta );
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, "GPBulkLoaderMeta.Exception.TableNotFound" ) );
}
} else {
throw new KettleException( BaseMessages.getString( PKG, "GPBulkLoaderMeta.Exception.TableNotSpecified" ) );
}
} catch ( Exception e ) {
throw new KettleException(
BaseMessages.getString( PKG, "GPBulkLoaderMeta.Exception.ErrorGettingFields" ), e );
} finally {
db.close();
}
} else {
throw new KettleException( BaseMessages.getString( PKG, "GPBulkLoaderMeta.Exception.ConnectionNotDefined" ) );
}
}
/**
* @return the schemaName
*/
@Override
public String getSchemaName() {
return schemaName;
}
View on GitHub (pinned to f3058517a1)