Skip to content

Document the need for a JdbcDialect bean when using Spring Data JDBC and AOT #48240

@rhdai

Description

@rhdai

spring-boot:run ok
spring-boot:aot

Exception in thread "main" org.springframework.beans.factory.aot.AotProcessingException: Error executing 'org.springframework.beans.factory.aot.BeanRegistrationsAotProcessor': Error creating bean with name 'jdbcDialect' defined in class path resource [org/example/springbootdemo/dao/config/CustomJdbcConfiguration.class]: Unsatisfied dependency expressed through method 'jdbcDialect' parameter 0: Error creating bean with name 'namedParameterJdbcTemplate' defined in class path resource [org/springframework/boot/jdbc/autoconfigure/NamedParameterJdbcTemplateConfiguration.class]: Failed to initialize dependency 'dataSourceScriptDatabaseInitializer' of NamedParameterJdbcOperations bean 'namedParameterJdbcTemplate': Error creating bean with name 'dataSourceScriptDatabaseInitializer' defined in class path resource [org/springframework/boot/jdbc/autoconfigure/DataSourceInitializationAutoConfiguration.class]: Unsatisfied dependency expressed through method 'dataSourceScriptDatabaseInitializer' parameter 0: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/jdbc/autoconfigure/DataSourceConfiguration$Hikari.class]: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception with message: Failed to determine a suitable driver class

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions