dbeaver/dbeaver · error · DBDatabaseException
Can't read tablespace statistics
Error message
Can't read tablespace statistics
What it means
AltibaseDataSource.refreshTablespaceStatistics wraps any DBException raised while iterating and loading sizes of each AltibaseTablespace into DBDatabaseException('Can't read tablespace statistics'). The finally block still sets hasStatistics=true, so a later non-forced refresh returns early without retrying.
Source
Thrown at plugins/org.jkiss.dbeaver.ext.altibase/src/org/jkiss/dbeaver/ext/altibase/model/AltibaseDataSource.java:690
void resetStatistics() {
hasStatistics = false;
}
@Override
public void collectObjectStatistics(@NotNull DBRProgressMonitor monitor, boolean totalSizeOnly, boolean forceRefresh) throws DBException {
if (hasStatistics && !forceRefresh) {
return;
}
try {
for (AltibaseTablespace tbs : tablespaceCache.getAllObjects(monitor, AltibaseDataSource.this)) {
AltibaseTablespace tablespace = tablespaceCache.getObject(monitor, AltibaseDataSource.this, tbs.getName());
if (tablespace != null) {
tablespace.loadSizes(monitor);
}
}
} catch (DBException e) {
throw new DBDatabaseException("Can't read tablespace statistics", e, getDataSource());
} finally {
hasStatistics = true;
}
}
///////////////////////////////////////////////
// Altibase Properties
@NotNull
public List<AltibaseProperty> getProperties(DBRProgressMonitor monitor)
throws DBException {
return loadPropertyList(monitor);
}
@NotNull
private List<AltibaseProperty> loadPropertyList(@NotNull DBRProgressMonitor monitor) throws DBException {
try (JDBCSession session = DBUtils.openMetaSession(monitor, this, "Load properties")) {
try (JDBCPreparedStatement dbStat = session.prepareStatement("SELECT * FROM V$PROPERTY ORDER BY NAME ASC")) {
try (JDBCResultSet dbResult = dbStat.executeQuery()) {View on GitHub (pinned to 1e5ee1042b)
Solutions
- Connect with a user that has privileges to read Altibase tablespace sizing views.
- Force-refresh again after fixing privileges (hasStatistics is set true even on failure, so a force flag may be required).
- Check the wrapped DBException cause for the specific tablespace/object that failed and address it.
Example fix
// before
} catch (DBException e) {
throw new DBDatabaseException("Can't read tablespace statistics", e, getDataSource());
} finally {
hasStatistics = true;
}
// after - only mark statistics loaded on success so a retry is possible
} catch (DBException e) {
throw new DBDatabaseException("Can't read tablespace statistics", e, getDataSource());
}
hasStatistics = true; Defensive patterns
Strategy: try-catch
Try / catch
try {
dataSource.refreshTablespaceStatistics(monitor, forceRefresh);
} catch (DBDatabaseException e) {
// statistics partially unavailable; degrade gracefully, log the wrapped cause
log.warn("Tablespace statistics unavailable", e);
} Prevention
- Connect with a user that has privileges on Altibase tablespace sizing views.
- Because hasStatistics is set true even on failure, pass a force refresh after fixing the root cause.
- Surface the wrapped DBException cause to identify the failing tablespace.
When it happens
Trigger: Forcing a metadata/statistics refresh when one tablespace's loadSizes(monitor) fails; iterating tablespaceCache.getAllObjects raises DBException (privilege, missing system view, stale cache).
Common situations: Connected user lacks SELECT on the tablespace system views; Altibase version exposes different sizing columns; a tablespace is in an inconsistent state; cache was partially populated.
Related errors
- Can't read tablespace statistics
- Error reading table statistics
- Error reading tablespace name
- Failed to load database properties
- Not connected to database
AI-assisted analysis of dbeaver/dbeaver@1e5ee1042b (2026-08-13).
Data as JSON: /api/errors/94b028648f989356.
Report an issue: GitHub.