{"record":{"id":"1689679f8552a842","repo":"apache/shardingsphere","slug":"invalid-data-source-s-error-message-is-s","errorCode":null,"errorMessage":"Invalid data source `%s`, error message is: %s","messagePattern":"Invalid data source `(.+?)`, error message is: (.+?)","errorType":"validation","errorClass":"InvalidDataSourcePoolPropertiesException","httpStatus":null,"severity":"error","filePath":"infra/data-source-pool/core/src/main/java/org/apache/shardingsphere/infra/datasource/pool/props/validator/DataSourcePoolPropertiesValidator.java","lineNumber":71,"sourceCode":"     */\n    public static Map<String, Exception> validate(final Map<String, DataSourcePoolProperties> propsMap, final Collection<PrivilegeCheckType> expectedPrivileges) {\n        Map<String, Exception> result = new LinkedHashMap<>(propsMap.size(), 1F);\n        for (Entry<String, DataSourcePoolProperties> entry : propsMap.entrySet()) {\n            try {\n                validateProperties(entry.getKey(), entry.getValue());\n                validateConnection(entry.getKey(), entry.getValue(), expectedPrivileges);\n            } catch (final InvalidDataSourcePoolPropertiesException ex) {\n                result.put(entry.getKey(), ex);\n            }\n        }\n        return result;\n    }\n    \n    private static void validateProperties(final String dataSourceName, final DataSourcePoolProperties props) throws InvalidDataSourcePoolPropertiesException {\n        try {\n            TypedSPILoader.findService(DataSourcePoolPropertiesContentValidator.class, props.getPoolClassName()).ifPresent(optional -> optional.validate(props));\n        } catch (final IllegalArgumentException ex) {\n            throw new InvalidDataSourcePoolPropertiesException(dataSourceName, ex.getMessage());\n        }\n    }\n    \n    private static void validateConnection(final String dataSourceName, final DataSourcePoolProperties props,\n                                           final Collection<PrivilegeCheckType> expectedPrivileges) throws InvalidDataSourcePoolPropertiesException {\n        DataSource dataSource = null;\n        try {\n            dataSource = DataSourcePoolCreator.create(props);\n            checkFailFast(dataSource);\n            if (expectedPrivileges.isEmpty() || expectedPrivileges.contains(PrivilegeCheckType.NONE)) {\n                return;\n            }\n            checkPrivileges(dataSource, props, expectedPrivileges);\n            // CHECKSTYLE:OFF\n        } catch (final SQLException | RuntimeException ex) {\n            // CHECKSTYLE:ON\n            throw new InvalidDataSourcePoolPropertiesException(dataSourceName, ex.getMessage());\n        } finally {","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/apache/shardingsphere/blob/e952770a215630a3659c75d64369168cd3e26b82/infra/data-source-pool/core/src/main/java/org/apache/shardingsphere/infra/datasource/pool/props/validator/DataSourcePoolPropertiesValidator.java#L53-L89","documentation":"Error \"Invalid data source `%s`, error message is: %s\" thrown in apache/shardingsphere.","triggerScenarios":"Data source pool property validation fails when ShardingSphere initializes or validates a connection pool.","commonSituations":"Wrong credentials, unreachable host, or invalid pool property in the data source configuration at startup or ALTER/REGISTER STORAGE UNIT time.","solutions":["Verify the JDBC URL, username, and password of the failing data source.","Check the pool properties (e.g. maximumPoolSize, connectionTimeout) for invalid values.","Confirm the target database is reachable and accepts connections."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e952770a215630a3659c75d64369168cd3e26b82","analyzedAt":"2026-08-14T13:54:53.392Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}