{"record":{"id":"d37284fd6a1d2316","repo":"hibernate/hibernate-orm","slug":"could-not-instantiate-singular-registered-connecti","errorCode":null,"errorMessage":"Could not instantiate singular-registered ConnectionProvider","messagePattern":"Could not instantiate singular-registered ConnectionProvider","errorType":"exception","errorClass":"HibernateException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/engine/jdbc/connections/internal/ConnectionProviderInitiator.java","lineNumber":155,"sourceCode":"\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new HibernateException( \"Could not instantiate connection provider [\" + providerName + \"]\", e );\n\t\t}\n\t}\n\n\tprivate ConnectionProvider instantiateConnectionProvider(\n\t\t\tMap<String, Object> configurationValues, StrategySelector strategySelector, BeanContainer beanContainer) {\n\t\tif ( configurationValues.containsKey( DATASOURCE ) ) {\n\t\t\treturn new DataSourceConnectionProvider();\n\t\t}\n\n\t\tfinal var singleRegisteredProvider = getSingleRegisteredProvider( strategySelector );\n\t\tif ( singleRegisteredProvider != null ) {\n\t\t\ttry {\n\t\t\t\treturn singleRegisteredProvider.getConstructor().newInstance();\n\t\t\t}\n\t\t\tcatch (IllegalAccessException | NoSuchMethodException | InvocationTargetException | InstantiationException e) {\n\t\t\t\tthrow new HibernateException( \"Could not instantiate singular-registered ConnectionProvider\", e );\n\t\t\t}\n\t\t}\n\t\telse if ( hasConfiguration( configurationValues, C3P0_CONFIG_PREFIX ) ) {\n\t\t\treturn instantiateProvider( strategySelector, C3P0_STRATEGY );\n\t\t}\n\t\telse if ( hasConfiguration( configurationValues, HIKARI_CONFIG_PREFIX ) ) {\n\t\t\treturn instantiateProvider( strategySelector, HIKARI_STRATEGY );\n\t\t}\n\t\telse if ( hasConfiguration( configurationValues, AGROAL_CONFIG_PREFIX ) ) {\n\t\t\treturn instantiateProvider( strategySelector, AGROAL_STRATEGY );\n\t\t}\n\t\telse if ( hasConfiguration( configurationValues, UCP_CONFIG_PREFIX ) ) {\n\t\t\treturn instantiateProvider( strategySelector, UCP_STRATEGY );\n\t\t}\n\t\telse if ( configurationValues.containsKey( URL ) ) {\n\t\t\treturn new DriverManagerConnectionProvider();\n\t\t}\n\t\telse {","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/engine/jdbc/connections/internal/ConnectionProviderInitiator.java#L137-L173","documentation":"Error \"Could not instantiate singular-registered ConnectionProvider\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Thrown at hibernate-core/src/main/java/org/hibernate/engine/jdbc/connections/internal/ConnectionProviderInitiator.java:155 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the registered ConnectionProvider can be instantiated (accessible constructor, no instantiation errors)","Register a concrete ConnectionProvider implementation instead of an abstract/interface type"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}