pentaho/pentaho-kettle · error · KettleException
SynchronizeAfterMergeMeta.Exception.ErrorGettingFields
Error message
SynchronizeAfterMergeMeta.Exception.ErrorGettingFields
What it means
Wrapper error thrown by SynchronizeAfterMergeMeta.getTableFieldsMeta: any exception during the field-metadata lookup (connection issues, SQL errors, TableNotFound) is caught and rethrown as KettleException with ErrorGettingFields as the primary message and the original exception as the cause.
Solutions
- Inspect the cause chain of the KettleException for the root error (TableNotFound, SQL error, connection failure)
- Confirm the table/schema exists in the target database and the user has SELECT/DESCRIBE rights
- Test the database connection in the step dialog before running
- Wrap the call in try-catch and log cause.getMessage() for diagnostics
Example fix
// before
try { meta.getTableFieldsMeta(...); } catch (KettleException e) { log.error(e.getMessage()); }
// after
try { meta.getTableFieldsMeta(...); } catch (KettleException e) { log.error("Root cause: " + e.getCause(), e); } Defensive patterns
Strategy: try-catch
Validate before calling
// verify connection and table existence before lookup if (meta.getDatabaseMeta() == null || meta.getTablename() == null) return; Database db = new Database(transMeta, meta.getDatabaseMeta()); if (!db.checkTableExists(realSchema, realTable)) return;
Try / catch
try { meta.getTableFieldsMeta(...); } catch (KettleException e) { logError("Field lookup failed, cause=" + (e.getCause()!=null?e.getCause().getMessage():e.getMessage()), e); } Prevention
- Log the full cause chain, not just the top message
- Test DB connection and table existence before transformation runs
- Grant the DB user DESCRIBE/SELECT on the target table
When it happens
Trigger: Any failure inside the try block of getTableFieldsMeta — e.g. db.getTableFieldsMeta throws SQLException, or TableNotFound/TableNotSpecified was raised — gets wrapped by this message.
Common situations: Database unreachable during metadata lookup; table exists config-wise but missing in DB (cause is TableNotFound); wrong schema name; insufficient privileges to describe the table.
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
- GPBulkLoaderMeta.Exception.ErrorGettingFields
- ElasticSearchBulkMeta.Exception.ErrorReadingRepository
- ElasticSearchBulkMeta.Exception.ErrorSavingToRepository
- Error evaluating Internet address value metadata
- GPBulkLoaderMeta.Exception.ErrorGettingFields
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/9c2e813e72ae2d39.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/synchronizeaftermerge/SynchronizeAfterMergeMeta.java:1055
if ( databaseMeta != null ) {
Database db = new Database( loggingObject, databaseMeta );
try {
db.connect();
if ( !Utils.isEmpty( realTableName ) ) {
// Check if this table exists...
if ( db.checkTableExists( realSchemaName, realTableName ) ) {
return db.getTableFieldsMeta( realSchemaName, realTableName );
} else {
throw new KettleException( BaseMessages.getString(
PKG, "SynchronizeAfterMergeMeta.Exception.TableNotFound" ) );
}
} else {
throw new KettleException( BaseMessages.getString(
PKG, "SynchronizeAfterMergeMeta.Exception.TableNotSpecified" ) );
}
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString(
PKG, "SynchronizeAfterMergeMeta.Exception.ErrorGettingFields" ), e );
} finally {
db.close();
}
} else {
throw new KettleException( BaseMessages.getString(
PKG, "SynchronizeAfterMergeMeta.Exception.ConnectionNotDefined" ) );
}
}
/**
* @return the schemaName
*/
public String getSchemaName() {
return schemaName;
}
View on GitHub (pinned to f3058517a1)