OtterMind/Chat2DB · error · BusinessException
web.not.support.db.type
web.not.support.db.type
Error message
web.not.support.db.type
What it means
Thrown by validateSupportedDataSource when Chat2DB runs in a non-desktop, release build and a data source has serviceType 'LocalFile' with type 'H2' or 'SQLite'. These local-file DBs are intentionally blocked on the web/release distribution because the server has no local filesystem backing for them.
Source
Thrown at chat2db-community-server/chat2db-community-domain/chat2db-community-domain-core/src/main/java/ai/chat2db/community/domain/core/impl/db/DbWorkspaceDataSourceServiceImpl.java:148
}
}
return dataSources;
}
@Override
public List<WorkspaceDataSource> exportDisplayDataSources(List<Long> datasourceIds) {
return exportDataSources(datasourceIds).stream()
.map(this::prepareExportDataSource)
.toList();
}
private void validateSupportedDataSource(WorkspaceDataSource dataSource) {
if (!ConfigUtils.isDesktop()
&& ConfigUtils.isRelease()
&& "LocalFile".equalsIgnoreCase(dataSource.getServiceType())
&& ("H2".equalsIgnoreCase(dataSource.getType())
|| "SQLite".equalsIgnoreCase(dataSource.getType()))) {
throw new BusinessException("web.not.support.db.type");
}
}
private void applyDefaultDriverConfig(WorkspaceDataSource dataSource) {
if (dataSource == null) {
return;
}
if (dataSource.getDriverConfig() == null
|| StringUtils.isBlank(dataSource.getDriverConfig().getJdbcDriverClass())) {
dataSource.setDriverConfig(Chat2DBContext.getDefaultDriverConfig(dataSource.getType()));
}
}
private WorkspaceDataSource prepareExportDataSource(WorkspaceDataSource dataSource) {
dataSource = copyDataSource(dataSource);
if (dataSource == null) {
return null;
}View on GitHub (pinned to 5ee1e990e7)
Solutions
- Use the desktop edition for LocalFile H2/SQLite data sources, or host H2/SQLite as a server-mode/remote connection instead of LocalFile.
- Switch the offending datasource serviceType away from 'LocalFile' (e.g. to a TCP/server connection string).
- If this is genuinely a server scenario, change the DB type to one supported in web release mode.
Example fix
// before
ds.setServiceType("LocalFile");
ds.setType("H2"); // blocked in web release
// after
ds.setServiceType("Server");
ds.setUrl("jdbc:h2:tcp://<host>:9092//data/mydb");
Defensive patterns
Strategy: validation
Validate before calling
boolean webRelease = ConfigUtils.isRelease() && !ConfigUtils.isDesktop();
boolean blocked = webRelease && "LocalFile".equalsIgnoreCase(ds.getServiceType())
&& ("H2".equalsIgnoreCase(ds.getType()) || "SQLite".equalsIgnoreCase(ds.getType()));
if (blocked) throw new BusinessException("web.not.support.db.type"); Prevention
- Gate LocalFile H2/SQLite datasources to the desktop edition in the UI.
- Prefer server-mode H2/SQLite connections for web deployments.
- Validate serviceType+type+runtime mode before persisting a datasource.
When it happens
Trigger: Calling create/update/test on a WorkspaceDataSource from a web (ConfigUtils.isRelease() && !isDesktop()) deployment where serviceType is 'LocalFile' and the db type is H2 or SQLite.
Common situations: Configuring a LocalFile H2/SQLite datasource through the web UI instead of the desktop app; a desktop-exported config bundle imported into a server deployment; flipping runtime mode without resetting LocalFile entries.
Related errors
- The baseURL is not valid!
- The baseURL is not valid!
- GITHUB_EVENT_PATH is required.
- No database connection context found. Call list_all_datasour
- No database connection context found. Provide dataSourceId/d
AI-assisted analysis of OtterMind/Chat2DB@5ee1e990e7 (2026-08-14).
Data as JSON: /api/errors/aa2b976084c8fadc.
Report an issue: GitHub.