dbeaver/dbeaver · error · CoreException
Unable to find data source with id {0}
Error message
Unable to find data source with id {0} What it means
Thrown when DBUtils.findDataSource() cannot locate a datasource by its ID within the specified project. The datasource ID was present in the configuration (so [148]'s null check passed) but the datasource was not found in the project's connection registry. The message includes the actual datasourceId for diagnosis.
Source
Thrown at plugins/org.jkiss.dbeaver.debug.core/src/org/jkiss/dbeaver/debug/core/DebugUtils.java:211
}
/**
* Fires a terminate event.
*/
public static void fireTerminate(Object source) {
fireEvent(new DebugEvent(source, DebugEvent.TERMINATE));
}
@NotNull
public static DBPDataSourceContainer getDataSourceContainer(@NotNull ILaunchConfiguration configuration) throws CoreException {
String projectName = configuration.getAttribute(DBGConstants.ATTR_PROJECT_NAME, (String)null);
String datasourceId = configuration.getAttribute(DBGConstants.ATTR_DATASOURCE_ID, (String)null);
if (datasourceId == null) {
throw new CoreException(newErrorStatus("Datasource not specified in debug configuration"));
}
DBPDataSourceContainer datasourceDescriptor = DBUtils.findDataSource(projectName, datasourceId);
if (datasourceDescriptor == null) {
throw new CoreException(newErrorStatus("Unable to find data source with id " + datasourceId));
}
return datasourceDescriptor;
}
}
View on GitHub (pinned to 1e5ee1042b)
Solutions
- Open the debug configuration and re-select the correct datasource
- If the datasource was deleted, recreate it with the same connection details then update the debug configuration
- Verify the project name stored in the launch configuration (ATTR_PROJECT_NAME) matches the project where the datasource lives
Defensive patterns
Strategy: validation
Validate before calling
// Verify the datasource exists before launching
String datasourceId = configuration.getAttribute(
DBGConstants.ATTR_DATASOURCE_ID, (String) null);
String projectName = configuration.getAttribute(
DBGConstants.ATTR_PROJECT_NAME, (String) null);
if (DBUtils.findDataSource(projectName, datasourceId) == null) {
// datasource no longer exists — inform user to re-select
} Try / catch
try {
DebugUtils.getDataSourceContainer(configuration);
} catch (CoreException e) {
String msg = e.getStatus().getMessage();
if (msg.startsWith("Unable to find data source")) {
// datasource deleted — prompt user to rebind the configuration
}
} Prevention
- After deleting or moving a datasource, update any debug configurations that reference it
- Validate datasource existence with DBUtils.findDataSource() before launching
- Keep the project name in the launch configuration in sync with the datasource's actual project
When it happens
Trigger: Calling DebugUtils.getDataSourceContainer() where datasourceId is non-null but DBUtils.findDataSource(projectName, datasourceId) returns null. The lookup searches the named project's datasource registry.
Common situations: The datasource was deleted after the debug configuration was created. The datasource was moved to a different project. The project name changed so the lookup targets the wrong project. The datasource ID reference is stale.
Related errors
- Unable to find debug controller for datasource {0}
- Datasource not specified in debug configuration
- Can't find datasource '{}'
- Can't find datasource node for '{}'
- `type` attribute is mandatory
AI-assisted analysis of dbeaver/dbeaver@1e5ee1042b (2026-08-13).
Data as JSON: /api/errors/c54677adfcd3cfaf.
Report an issue: GitHub.