{"record":{"id":"cf4652ae46e9479b","repo":"pentaho/pentaho-kettle","slug":"orabulkloadermeta-exception-errorgettingfields","errorCode":null,"errorMessage":"OraBulkLoaderMeta.Exception.ErrorGettingFields","messagePattern":"OraBulkLoaderMeta\\.Exception\\.ErrorGettingFields","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/oracle-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/orabulkloader/OraBulkLoaderMeta.java","lineNumber":882,"sourceCode":"    if ( databaseMeta != null ) {\n      Database db = new Database( loggingObject, databaseMeta );\n      try {\n        db.connect();\n\n        if ( !Utils.isEmpty( realTableName ) ) {\n          String schemaTable = databaseMeta.getQuotedSchemaTableCombination( realSchemaName, realTableName );\n\n          // Check if this table exists...\n          if ( db.checkTableExists( schemaTable ) ) {\n            return db.getTableFields( schemaTable );\n          } else {\n            throw new KettleException( BaseMessages.getString( PKG, \"OraBulkLoaderMeta.Exception.TableNotFound\" ) );\n          }\n        } else {\n          throw new KettleException( BaseMessages.getString( PKG, \"OraBulkLoaderMeta.Exception.TableNotSpecified\" ) );\n        }\n      } catch ( Exception e ) {\n        throw new KettleException(\n          BaseMessages.getString( PKG, \"OraBulkLoaderMeta.Exception.ErrorGettingFields\" ), e );\n      } finally {\n        db.close();\n      }\n    } else {\n      throw new KettleException( BaseMessages.getString( PKG, \"OraBulkLoaderMeta.Exception.ConnectionNotDefined\" ) );\n    }\n\n  }\n\n  /**\n   * @return the schemaName\n   */\n  public String getSchemaName() {\n    return schemaName;\n  }\n\n  /**","sourceCodeStart":864,"sourceCodeEnd":900,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/oracle-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/orabulkloader/OraBulkLoaderMeta.java#L864-L900","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Read the 'cause' of this exception in the log for the actual database error","Verify the connection works using the PDI 'Test' button on the database connection","Ensure the Oracle JDBC driver (ojdbc jar) is present in the PDI lib/plugins directory","Confirm user privileges to query the table metadata"],"exampleFix":"// log handling\n// before: only outer message shown\nthrow new KettleException( BaseMessages.getString( PKG, \"...ErrorGettingFields\" ), e );\n// after: inspect e / e.getCause() in logs to find root cause","handlingStrategy":"try-catch","validationCode":"// Test the DB connection before field lookup:\nDatabase db = new Database( loggingObject, databaseMeta );\ndb.connect(); // throws early if connectivity/driver fails\ndb.disconnect();","typeGuard":null,"tryCatchPattern":"try { fields = meta.getTableFields(); } catch ( KettleException e ) { Throwable root = e; while ( root.getCause() != null ) root = root.getCause(); log.error( \"Root cause: \" + root.getMessage(), root ); }","preventionTips":["Always unwrap the cause chain for the real database error","Ship the correct ojdbc driver with your PDI install","Use the connection Test button before designing against a connection","Check network/firewall access to Oracle from the PDI host"],"tags":["kettle","pdi","oracle","wrapper-exception","database"],"backgroundTag":"database-query-failed","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}