pentaho/pentaho-kettle · error · KettleDatabaseException

DatabaseMeta.Error.UnableRetrieveDbInfo

Error message

DatabaseMeta.Error.UnableRetrieveDbInfo

What it means

DatabaseMetaInformation.getData() connects to the database and collects metadata (tables, columns, procedures, etc.). Any exception thrown while querying that metadata is wrapped in a KettleDatabaseException with the localized message 'DatabaseMeta.Error.UnableRetrieveDbInfo'. The original exception is attached as the cause, so the real reason (connection failure, bad SQL, permissions) lives in the stack trace.

Solutions

  1. Read the cause chain (getCause()) of the KettleDatabaseException for the underlying JDBC error
  2. Verify connection settings (host, port, database name, user, password) in the DatabaseMeta connection dialog
  3. Confirm the JDBC driver JAR is present in lib/ or the driver directory
  4. Connect manually with the same credentials using a DB client to rule out network/permission problems

Example fix

// before
DatabaseMetaInformation info = new DatabaseMetaInformation( dbMeta );
info.getData( monitor );
// after
try {
  info.getData( monitor );
} catch ( KettleDatabaseException e ) {
  logError( "DB info lookup failed: " + e.getCause(), e ); // inspect the real cause
}
Defensive patterns

Strategy: try-catch

Validate before calling

// pre-check connectivity before getData()
Database db = new Database( dbMeta );
db.connect();
if ( !db.checkTableExists( "DUAL" ) && dbMeta.getDatabaseType().length() == 0 ) { /* config suspect */ }
db.disconnect();

Try / catch

try { info.getData( monitor ); } catch ( KettleDatabaseException e ) { log.error( "DB info failed: " + e.getCause(), e ); }

Prevention

When it happens

Trigger: Any Exception raised inside getData() while calling db.connect(), getTables(), getColumns(), getProcedures() or similar Database metadata methods — e.g. wrong credentials, unreachable host, driver missing, or a JDBC driver that throws on a metadata call.

Common situations: Checking a database connection from Spoon/the UI; databases behind firewalls; JDBC driver not on the classpath; the connected user lacking permission on system catalogs; DB upgraded so a metadata query no longer works.

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/3dbc9c1561fb6943. Report an issue: GitHub.

Appendix: source

Thrown at core/src/main/java/org/pentaho/di/core/database/DatabaseMetaInformation.java:404

        setSynonymMap( db.getSynonymMap() );
      }
      if ( monitor != null ) {
        monitor.worked( 1 );
      }

      if ( monitor != null && monitor.isCanceled() ) {
        return;
      }
      if ( monitor != null ) {
        monitor.subTask( BaseMessages.getString( PKG, "DatabaseMeta.Info.GettingProcedures" ) );
      }
      setProcedures( db.getProcedures() );
      if ( monitor != null ) {
        monitor.worked( 1 );
      }

    } catch ( Exception e ) {
      throw new KettleDatabaseException(
        BaseMessages.getString( PKG, "DatabaseMeta.Error.UnableRetrieveDbInfo" ), e );
    } finally {
      if ( monitor != null ) {
        monitor.subTask( BaseMessages.getString( PKG, "DatabaseMeta.Info.ClosingDbConnection" ) );
      }

      db.close();
      if ( monitor != null ) {
        monitor.worked( 1 );
      }
    }
    if ( monitor != null ) {
      monitor.done();
    }
  }

  public Map<String, Collection<String>> getTableMap() {
    return tableMap;

View on GitHub (pinned to f3058517a1)