{"record":{"id":"c54677adfcd3cfaf","repo":"dbeaver/dbeaver","slug":"unable-to-find-data-source-with-id-0","errorCode":null,"errorMessage":"Unable to find data source with id {0}","messagePattern":"Unable to find data source with id (.+?)","errorType":"exception","errorClass":"CoreException","httpStatus":null,"severity":"error","filePath":"plugins/org.jkiss.dbeaver.debug.core/src/org/jkiss/dbeaver/debug/core/DebugUtils.java","lineNumber":211,"sourceCode":"    }\n\n    /**\n     * Fires a terminate event.\n     */\n    public static void fireTerminate(Object source) {\n        fireEvent(new DebugEvent(source, DebugEvent.TERMINATE));\n    }\n\n    @NotNull\n    public static DBPDataSourceContainer getDataSourceContainer(@NotNull ILaunchConfiguration configuration) throws CoreException {\n        String projectName = configuration.getAttribute(DBGConstants.ATTR_PROJECT_NAME, (String)null);\n        String datasourceId = configuration.getAttribute(DBGConstants.ATTR_DATASOURCE_ID, (String)null);\n        if (datasourceId == null) {\n            throw new CoreException(newErrorStatus(\"Datasource not specified in debug configuration\"));\n        }\n        DBPDataSourceContainer datasourceDescriptor = DBUtils.findDataSource(projectName, datasourceId);\n        if (datasourceDescriptor == null) {\n            throw new CoreException(newErrorStatus(\"Unable to find data source with id \" + datasourceId));\n        }\n        return datasourceDescriptor;\n    }\n}\n","sourceCodeStart":193,"sourceCodeEnd":216,"githubUrl":"https://github.com/dbeaver/dbeaver/blob/1e5ee1042bc61661368942aece126f3e67049955/plugins/org.jkiss.dbeaver.debug.core/src/org/jkiss/dbeaver/debug/core/DebugUtils.java#L193-L216","documentation":"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.","triggerScenarios":"Calling DebugUtils.getDataSourceContainer() where datasourceId is non-null but DBUtils.findDataSource(projectName, datasourceId) returns null. The lookup searches the named project's datasource registry.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Verify the datasource exists before launching\nString datasourceId = configuration.getAttribute(\n    DBGConstants.ATTR_DATASOURCE_ID, (String) null);\nString projectName = configuration.getAttribute(\n    DBGConstants.ATTR_PROJECT_NAME, (String) null);\nif (DBUtils.findDataSource(projectName, datasourceId) == null) {\n    // datasource no longer exists — inform user to re-select\n}","typeGuard":null,"tryCatchPattern":"try {\n    DebugUtils.getDataSourceContainer(configuration);\n} catch (CoreException e) {\n    String msg = e.getStatus().getMessage();\n    if (msg.startsWith(\"Unable to find data source\")) {\n        // datasource deleted — prompt user to rebind the configuration\n    }\n}","preventionTips":["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"],"tags":["debugging","configuration","datasource"],"backgroundTag":null,"analyzedSha":"1e5ee1042bc61661368942aece126f3e67049955","analyzedAt":"2026-08-13T23:31:13.467Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}