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 DbJdbcDriverServiceImpl.requireDriverManagementSupported when ConfigUtils.isDesktop() is false. isDesktop() checks the system property 'chat2db.mode' for the value DESKTOP; in the web/server deployment that property is unset, so upload/download/unload of JDBC driver jars is refused. The i18n key 'web.not.support.db.type' resolves to 'Web terminal does not support the current database type, please use the desktop client'. This is a deliberate capability gate, not a bug.
Source
Thrown at chat2db-community-server/chat2db-community-domain/chat2db-community-domain-core/src/main/java/ai/chat2db/community/domain/core/impl/db/DbJdbcDriverServiceImpl.java:294
for (String j : dc.getJdbcDriver().split(",")) {
if (jarName.equals(j)) {
return true;
}
}
}
}
return false;
}
@Override
public void unloadDriver(String jdbcDriver) {
JdbcDriverManager.unload(jdbcDriver);
}
@Override
public void requireDriverManagementSupported() {
if (!ConfigUtils.isDesktop()) {
throw new BusinessException("web.not.support.db.type");
}
}
private boolean driverExists(DriverConfig driverConfig) {
if (driverConfig == null || StringUtils.isBlank(driverConfig.getJdbcDriver())) {
return false;
}
for (String jarPath : driverConfig.getJdbcDriver().split(",")) {
File file = new File(JdbcDriverConstants.DRIVER_LIB_PATH + jarPath);
if (!file.exists()) {
return false;
}
}
return true;
}
}
View on GitHub (pinned to 5ee1e990e7)
Solutions
- Perform driver management from the desktop client (set -Dchat2db.mode=DESKTOP), or pre-stage drivers into DRIVER_LIB_PATH for web deployments.
- Gate the UI action on the desktop context so the request is never sent from web mode.
- Do not attempt to bypass the guard by faking the mode; instead bundle the needed driver in the image.
Defensive patterns
Strategy: type-guard
Validate before calling
if (!ConfigUtils.isDesktop()) {
// do not call driver-management endpoints; this is desktop-only
} Type guard
boolean canManageDrivers() {
return ConfigUtils.isDesktop(); // "DESKTOP".equalsIgnoreCase(System.getProperty("chat2db.mode"))
} Prevention
- Hide driver-management UI in web deployments.
- Bundle drivers into the web/docker image rather than managing at runtime.
When it happens
Trigger: Any driver-management endpoint (upload, delete, replace, unload a JDBC driver jar) invoked while running the Community backend in web/server mode (chat2db.mode != DESKTOP). The controller/service calls requireDriverManagementSupported() first to enforce desktop-only driver edits.
Common situations: Operating the Docker/web deployment and attempting to manage drivers via the UI; a script that talks to the driver endpoints against a server-mode instance; forgetting that desktop-only operations are guarded.
Related errors
- Missing local file path
- Failed to update local file
- web.not.support.db.type
- jdbc.driver.downloadFailed
- routine.operation.onlyMysqlSupported
AI-assisted analysis of OtterMind/Chat2DB@5ee1e990e7 (2026-08-14).
Data as JSON: /api/errors/4566b144cc190691.
Report an issue: GitHub.