pentaho/pentaho-kettle · error · KettleException

OraBulkLoaderMeta.Exception.ErrorGettingFields

Error message

OraBulkLoaderMeta.Exception.ErrorGettingFields

What it means

Generic wrapper thrown by OraBulkLoaderMeta.getTableFields(): any Exception raised while connecting to the database, checking table existence, or reading table metadata is caught and rethrown as a KettleException with the ErrorGettingFields message and the original exception as cause. It signals failure of the target-column resolution step rather than a specific root cause.

Solutions

  1. Read the 'cause' of this exception in the log for the actual database error
  2. Verify the connection works using the PDI 'Test' button on the database connection
  3. Ensure the Oracle JDBC driver (ojdbc jar) is present in the PDI lib/plugins directory
  4. Confirm user privileges to query the table metadata

Example fix

// log handling
// before: only outer message shown
throw new KettleException( BaseMessages.getString( PKG, "...ErrorGettingFields" ), e );
// after: inspect e / e.getCause() in logs to find root cause
Defensive patterns

Strategy: try-catch

Validate before calling

// Test the DB connection before field lookup:
Database db = new Database( loggingObject, databaseMeta );
db.connect(); // throws early if connectivity/driver fails
db.disconnect();

Try / catch

try { fields = meta.getTableFields(); } catch ( KettleException e ) { Throwable root = e; while ( root.getCause() != null ) root = root.getCause(); log.error( "Root cause: " + root.getMessage(), root ); }

Prevention

When it happens

Trigger: Any failure inside getTableFields after the connection was created: connection errors, checkTableExists throwing, getTableFields metadata read failing. Inspect the cause chain for the real error.

Common situations: Bad JDBC URL/credentials; Oracle driver missing from the classpath; network/firewall blocking the DB host; table exists check failing due to permissions; wrapped TableNotFound/TableNotSpecified errors when callers only log the outer message.

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


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/cf4652ae46e9479b. Report an issue: GitHub.

Appendix: source

Thrown at plugins/oracle-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/orabulkloader/OraBulkLoaderMeta.java:882

    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, "OraBulkLoaderMeta.Exception.TableNotFound" ) );
          }
        } else {
          throw new KettleException( BaseMessages.getString( PKG, "OraBulkLoaderMeta.Exception.TableNotSpecified" ) );
        }
      } catch ( Exception e ) {
        throw new KettleException(
          BaseMessages.getString( PKG, "OraBulkLoaderMeta.Exception.ErrorGettingFields" ), e );
      } finally {
        db.close();
      }
    } else {
      throw new KettleException( BaseMessages.getString( PKG, "OraBulkLoaderMeta.Exception.ConnectionNotDefined" ) );
    }

  }

  /**
   * @return the schemaName
   */
  public String getSchemaName() {
    return schemaName;
  }

  /**

View on GitHub (pinned to f3058517a1)