{"record":{"id":"3dbc9c1561fb6943","repo":"pentaho/pentaho-kettle","slug":"databasemeta-error-unableretrievedbinfo","errorCode":null,"errorMessage":"DatabaseMeta.Error.UnableRetrieveDbInfo","messagePattern":"DatabaseMeta\\.Error\\.UnableRetrieveDbInfo","errorType":"exception","errorClass":"KettleDatabaseException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/database/DatabaseMetaInformation.java","lineNumber":404,"sourceCode":"        setSynonymMap( db.getSynonymMap() );\n      }\n      if ( monitor != null ) {\n        monitor.worked( 1 );\n      }\n\n      if ( monitor != null && monitor.isCanceled() ) {\n        return;\n      }\n      if ( monitor != null ) {\n        monitor.subTask( BaseMessages.getString( PKG, \"DatabaseMeta.Info.GettingProcedures\" ) );\n      }\n      setProcedures( db.getProcedures() );\n      if ( monitor != null ) {\n        monitor.worked( 1 );\n      }\n\n    } catch ( Exception e ) {\n      throw new KettleDatabaseException(\n        BaseMessages.getString( PKG, \"DatabaseMeta.Error.UnableRetrieveDbInfo\" ), e );\n    } finally {\n      if ( monitor != null ) {\n        monitor.subTask( BaseMessages.getString( PKG, \"DatabaseMeta.Info.ClosingDbConnection\" ) );\n      }\n\n      db.close();\n      if ( monitor != null ) {\n        monitor.worked( 1 );\n      }\n    }\n    if ( monitor != null ) {\n      monitor.done();\n    }\n  }\n\n  public Map<String, Collection<String>> getTableMap() {\n    return tableMap;","sourceCodeStart":386,"sourceCodeEnd":422,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/database/DatabaseMetaInformation.java#L386-L422","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Read the cause chain (getCause()) of the KettleDatabaseException for the underlying JDBC error","Verify connection settings (host, port, database name, user, password) in the DatabaseMeta connection dialog","Confirm the JDBC driver JAR is present in lib/ or the driver directory","Connect manually with the same credentials using a DB client to rule out network/permission problems"],"exampleFix":"// before\nDatabaseMetaInformation info = new DatabaseMetaInformation( dbMeta );\ninfo.getData( monitor );\n// after\ntry {\n  info.getData( monitor );\n} catch ( KettleDatabaseException e ) {\n  logError( \"DB info lookup failed: \" + e.getCause(), e ); // inspect the real cause\n}","handlingStrategy":"try-catch","validationCode":"// pre-check connectivity before getData()\nDatabase db = new Database( dbMeta );\ndb.connect();\nif ( !db.checkTableExists( \"DUAL\" ) && dbMeta.getDatabaseType().length() == 0 ) { /* config suspect */ }\ndb.disconnect();","typeGuard":null,"tryCatchPattern":"try { info.getData( monitor ); } catch ( KettleDatabaseException e ) { log.error( \"DB info failed: \" + e.getCause(), e ); }","preventionTips":["Test the connection dialog before running jobs","Keep JDBC drivers current and in lib/","Grant the service account read access to system catalogs","Check network/firewall reachability from the Kettle host"],"tags":["database","metadata","jdbc"],"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"}