spring-data-jpa: Native Image Fails w/ Multiple DataSources

    It looks to me like the references configured on `@EnableJpaRepositories` aren't being applied correctly. I suspect that this is a Spring Data JPA bug but it could also be a Spring Framework problem. @matthenry87 please open a Spring Data JPA issue and we can take things from there.

_Originally posted by @wilkinsona in https://github.com/spring-projects/spring-boot/issues/33656#issuecomment-1369838626_

Trying to do all of the groundwork for our teams to start using native images. We use multiple data sources in over half of our applications.

Example project: https://github.com/matthenry87/native-image-multiple-datasource-testing

Spring Boot 3.0.1

GraalVM 22.3.0 Java 17 CE Java version info: ‘17.0.5+8-jvmci-22.3-b08’ C compiler: gcc (linux, x86_64, 9.4.0) Garbage collector: Serial GC

Using GraalVM native-image directly via mvn native:compile -Pnative -DskipTests

Error:

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v3.0.1)

2022-12-29T19:13:40.616-07:00  INFO 30729 --- [           main] o.m.nativetesting.api.ApiApplication     : Starting AOT-processed ApiApplication using Java 17.0.5 with PID 30729 (/mnt/c/workspace/native-image-multimodule-testing/api/target/api started by matt in /mnt/c/workspace/native-image-multimodule-testing)
2022-12-29T19:13:40.617-07:00  INFO 30729 --- [           main] o.m.nativetesting.api.ApiApplication     : No active profile set, falling back to 1 default profile: "default"
2022-12-29T19:13:40.631-07:00  WARN 30729 --- [           main] o.s.c.support.GenericApplicationContext  : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'db1Service': Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'fooEntityRepository': Unexpected exception during bean creation
2022-12-29T19:13:40.633-07:00 ERROR 30729 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :

***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 0 of constructor in org.matthenry87.nativetesting.persistence.db1.Db1Service required a single bean, but 2 were found:
        - db1EntityManagerFactory: defined by method 'db1EntityManagerFactory' in null
        - db2EntityManagerFactory: defined by method 'db2EntityManagerFactory' in null


Action:

Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed

Funny thing, is that the Db1Service injects a single repository class, not an EntityManager.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 28 (21 by maintainers)

Most upvoted comments

Thank you all for your patience and sorry it took so long. We have a fix for this (see https://github.com/spring-projects/spring-framework/issues/30476) that is being reviewed and will be part of the next framework release in June.

Sorry, my bad, I was under the impression of missing hints causing this issue, however, it is the Spring Framework AOT persistence context injection causing that issue. We still need to sort out the AOT processing issue as the persistence context is skipped by Spring Framework if the property has been set.

Once the above two issues are fixed (draft PR’s already in place) the app still requires hints to assign the domain types to the PersistenceUnit via emf.setManagedTypes(PersistenceManagedTypes.of("org.matthenry87.nativetesting.api.db1.FooEntity")); and emf.setManagedTypes(PersistenceManagedTypes.of("org.matthenry87.nativetesting.api.db2.BarEntity")); in the DB*Config classes. With the above in place (plus some additional hikari hints) the provided example worked.

o.m.nativetesting.api.ApiApplication     : Started ApiApplication in 0.082 seconds (process running for 0.103)
o.m.nativetesting.api.ApiApplication     : Injected bean: org.matthenry87.nativetesting.api.db1.Db1Service@c7e8c73
o.m.nativetesting.api.ApiApplication     : Injected bean: org.matthenry87.nativetesting.api.db2.Db2Service@10a2d633

Thanks a lot Andy. We currently register the Repository AOT processors only once per Spring Data module. This imposes the limitation that only one @Enable${MODULE}Repositories annotation configuration is considered per ${MODULE}. It also explains why the second instance of @EnableJpaRepositories isn’t caught.

Let me take this to the team so we can explore options to work around this issue.

Upgrading to Spring Framework 6.1/Spring Boot 3.2 fixed the issue.

In AOT mode startup (if the Datasource fails) Hibernate fails with:

java.lang.NullPointerException: Cannot invoke "org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(java.sql.SQLException, String)" because the return value of "org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.sqlExceptionHelper()" is null
	at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:116) ~[hibernate-core-6.3.1.Final.jar:6.3.1.Final]
	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.getJdbcEnvironmentUsingJdbcMetadata(JdbcEnvironmentInitiator.java:273) ~[hibernate-core-6.3.1.Final.jar:6.3.1.Final]
	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:105) ~[hibernate-core-6.3.1.Final.jar:6.3.1.Final]
	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:66) ~[hibernate-core-6.3.1.Final.jar:6.3.1.Final]
	at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:129) ~[hibernate-core-6.3.1.Final.jar:6.3.1.Final]
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) ~[hibernate-core-6.3.1.Final.jar:6.3.1.Final]
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238) ~[hibernate-core-6.3.1.Final.jar:6.3.1.Final]
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215) ~[hibernate-core-6.3.1.Final.jar:6.3.1.Final]
	at org.hibernate.boot.model.relational.Database.<init>(Database.java:45) ~[hibernate-core-6.3.1.Final.jar:6.3.1.Final]
	at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:223) ~[hibernate-core-6.3.1.Final.jar:6.3.1.Final]
	at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMetadataCollectorImpl.java:191) ~[hibernate-core-6.3.1.Final.jar:6.3.1.Final]
	at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:169) ~[hibernate-core-6.3.1.Final.jar:6.3.1.Final]
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1432) ~[hibernate-core-6.3.1.Final.jar:6.3.1.Final]
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1503) ~[hibernate-core-6.3.1.Final.jar:6.3.1.Final]
	at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:142) ~[hibernate-core-6.3.1.Final.jar:6.3.1.Final]
	at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:376) ~[spring-orm-6.1.0-RC2.jar:6.1.0-RC2]

If the data source works, then the application starts up properly.

In native image mode, startup fails with:

Runtime reflection is not supported for public void com.zaxxer.hikari.HikariConfig.setJdbcUrl(java.lang.String)
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:89) ~[na:na]
	at java.base@17.0.5/java.lang.reflect.Method.acquireMethodAccessor(Method.java:71) ~[api:na]
	at java.base@17.0.5/java.lang.reflect.Method.invoke(Method.java:566) ~[api:na]
	at org.springframework.boot.context.properties.bind.JavaBeanBinder$BeanProperty.setValue(JavaBeanBinder.java:407) ~[na:na]
	at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:105) ~[na:na]
	at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:87) ~[na:na]
	at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:63) ~[na:an]

After adding hints for HikariConfig, we’re back to

Not a managed type: class org.matthenry87.nativetesting.api.db1.FooEntity
	at org.hibernate.metamodel.model.domain.internal.JpaMetamodelImpl.managedType(JpaMetamodelImpl.java:193) ~[na:an]

After configuring PersistenceManagedTypes for both entity manager factories, the native image mode works.

I added:

@Bean(name = "db2EntityManagerFactory")
EntityManagerFactory db2EntityManagerFactory(@Qualifier("db2ServerDataSource") DataSource db2ServerDataSource, @Qualifier("pmt2") PersistenceManagedTypes pmt2) {

	// …

	LocalContainerEntityManagerFactoryBean emf = new LocalContainerEntityManagerFactoryBean();
	// …
	emf.setManagedTypes(pmt2);
	
	// …
}

@Bean
PersistenceManagedTypes pmt2(ResourceLoader resourceLoader) {
	return new PersistenceManagedTypesScanner(resourceLoader)
			.scan("org.matthenry87.nativetesting.api.db2");
}

with the respective package configuration to each @Configuration class.

Therefore, closing this issue.

Another user with what appears to be the same problem: https://github.com/spring-projects/spring-boot/issues/37749.

So the problem described above has been fixed in 6.0.10-SNAPSHOT. I’ve upgraded the original sample (thank you for that @matthenry87!) and it goes further but fail at runtime due to a missing hint. I’ve created https://github.com/spring-projects/spring-boot/issues/35408 to fix that.

In the meantime, you can workaround by exposing a more specific type for the datasource (something you should do anyway, regardless of this issue, see https://docs.spring.io/spring-framework/reference/core/aot.html#aot.bestpractices.bean-type.

Changing the definition of the two datasource of something like the following helps:

@Bean(name = "db1ServerDataSource")
@ConfigurationProperties("db1")
HikariDataSource db1ServerDataSource() {
    return DataSourceBuilder.create().type(HikariDataSource.class).build();
}

The next problem is:

Caused by: java.lang.IllegalArgumentException: Not a managed type: class org.matthenry87.nativetesting.api.db1.FooEntity
	at org.hibernate.metamodel.model.domain.internal.JpaMetamodelImpl.managedType(JpaMetamodelImpl.java:181) ~[na:na]
	at org.hibernate.metamodel.model.domain.internal.MappingMetamodelImpl.managedType(MappingMetamodelImpl.java:496) ~[na:na]
	at org.hibernate.metamodel.model.domain.internal.MappingMetamodelImpl.managedType(MappingMetamodelImpl.java:99) ~[na:na]
	at org.springframework.data.jpa.repository.support.JpaMetamodelEntityInformation.<init>(JpaMetamodelEntityInformation.java:77) ~[api:na]
	at org.springframework.data.jpa.repository.support.JpaEntityInformationSupport.getEntityInformation(JpaEntityInformationSupport.java:69) ~[api:na]
	at org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getEntityInformation(JpaRepositoryFactory.java:246) ~[api:na]
	at org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getTargetRepository(JpaRepositoryFactory.java:211) ~[api:na]
	at org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getTargetRepository(JpaRepositoryFactory.java:194) ~[api:na]
	at org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getTargetRepository(JpaRepositoryFactory.java:81) ~[api:na]
	at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:317) ~[ap

@mp911de I wonder if the above is something that should be investigated by Spring Data still.

I am also waiting for this issue to be resolved: it s sad to not be able to use spring native just because there is no support for multiple datasources… Thanks for the work anyway

Sorry, my bad, I was under the impression of missing hints causing this issue, however, it is the Spring Framework AOT persistence context injection causing that issue. We still need to sort out the AOT processing issue as the persistence context is skipped by Spring Framework if the property has been set.

Aw bummer, I was excited when I saw your comment 😃 Will continue to monitor for updates here.

The NoSuchMethodException: com.zaxxer.hikari.HikariDataSource aspect was fixed in Spring Boot. Upgrading to Spring Boot 3.0.2 should no longer be an issue. Can you confirm this outcome @matthenry87?

Same error with 3.0.2:

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v3.0.2)

2023-02-15T17:17:30.021Z  INFO 1 --- [           main] o.m.nativetesting.api.ApiApplication     : Starting AOT-processed ApiApplication using Java 17.0.6 with PID 1 (/workspace/org.matthenry87.nativetesting.api.ApiApplication started by cnb in /workspace)
2023-02-15T17:17:30.021Z  INFO 1 --- [           main] o.m.nativetesting.api.ApiApplication     : No active profile set, falling back to 1 default profile: "default"
2023-02-15T17:17:30.029Z  WARN 1 --- [           main] o.s.c.support.GenericApplicationContext  : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'db1Service': Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'fooEntityRepository': Unexpected exception during bean creation
2023-02-15T17:17:30.030Z ERROR 1 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :

***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 0 of constructor in org.matthenry87.nativetesting.api.db1.Db1Service required a single bean, but 2 were found:
        - db1EntityManagerFactory: defined by method 'db1EntityManagerFactory' in unknown location
        - db2EntityManagerFactory: defined by method 'db2EntityManagerFactory' in unknown location


Action:

Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed```
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'db1ServerDataSource': Runtime reflection is not supported for public void com.zaxxer.hikari.HikariConfig.setJdbcUrl(java.lang.String)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:606) ~[api:6.0.3]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) ~[api:6.0.3]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[api:6.0.3]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[api:6.0.3]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[api:6.0.3]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[api:6.0.3]
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[api:6.0.3]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1405) ~[api:6.0.3]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1325) ~[api:6.0.3]
	at org.springframework.beans.factory.aot.BeanInstanceSupplier.resolveArgument(BeanInstanceSupplier.java:334) ~[na:na]
	... 63 common frames omitted
Caused by: com.oracle.svm.core.jdk.UnsupportedFeatureError: Runtime reflection is not supported for public void com.zaxxer.hikari.HikariConfig.setJdbcUrl(java.lang.String)
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:89) ~[na:na]
	at java.base@17.0.5/java.lang.reflect.Method.acquireMethodAccessor(Method.java:71) ~[api:na]
	at java.base@17.0.5/java.lang.reflect.Method.invoke(Method.java:566) ~[api:na]
	at org.springframework.boot.context.properties.bind.JavaBeanBinder$BeanProperty.setValue(JavaBeanBinder.java:376) ~[na:na]
	at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:104) ~[na:na]
	at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:86) ~[na:na]
	at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:62) ~[na:na]
	at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$5(Binder.java:476) ~[api:3.0.1]
	at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:590) ~[na:na]
	at org.springframework.boot.context.properties.bind.Binder$Context.withDataObject(Binder.java:576) ~[na:na]
	at org.springframework.boot.context.properties.bind.Binder.bindDataObject(Binder.java:474) ~[api:3.0.1]
	at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:414) ~[api:3.0.1]
	at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:343) ~[api:3.0.1]
	at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:332) ~[api:3.0.1]
	at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:262) ~[api:3.0.1]
	at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:249) ~[api:3.0.1]
	at org.springframework.boot.context.properties.ConfigurationPropertiesBinder.bind(ConfigurationPropertiesBinder.java:94) ~[api:3.0.1]
	at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.bind(ConfigurationPropertiesBindingPostProcessor.java:89) ~[api:3.0.1]
	at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:78) ~[api:3.0.1]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:420) ~[api:6.0.3]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1743) ~[api:6.0.3]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:599) ~[api:6.0.3]
	... 72 common frames omitted

and

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: No default constructor found
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:146) ~[na:na]
	at org.springframework.boot.jdbc.DataSourceBuilder.build(DataSourceBuilder.java:175) ~[api:3.0.1]
	at org.matthenry87.nativetesting.api.db1.Db1Config.db1ServerDataSource(Db1Config.java:33) ~[api:na]
	at org.matthenry87.nativetesting.api.db1.Db1Config$$SpringCGLIB$$0.CGLIB$db1ServerDataSource$0(<generated>) ~[api:na]
	at org.matthenry87.nativetesting.api.db1.Db1Config$$SpringCGLIB$$2.invoke(<generated>) ~[api:na]
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:258) ~[api:6.0.3]
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[na:na]
	at org.matthenry87.nativetesting.api.db1.Db1Config$$SpringCGLIB$$0.db1ServerDataSource(<generated>) ~[api:na]
	at org.matthenry87.nativetesting.api.db1.Db1Config__BeanDefinitions.lambda$getDbServerDataSourceInstanceSupplier$0(Db1Config__BeanDefinitions.java:32) ~[na:na]
	at org.springframework.util.function.ThrowingFunction.apply(ThrowingFunction.java:63) ~[api:6.0.3]
	at org.springframework.util.function.ThrowingFunction.apply(ThrowingFunction.java:51) ~[api:6.0.3]
	at org.springframework.beans.factory.aot.BeanInstanceSupplier.lambda$withGenerator$0(BeanInstanceSupplier.java:173) ~[na:na]
	at org.springframework.util.function.ThrowingBiFunction.apply(ThrowingBiFunction.java:68) ~[api:6.0.3]
	at org.springframework.util.function.ThrowingBiFunction.apply(ThrowingBiFunction.java:54) ~[api:6.0.3]
	at org.springframework.beans.factory.aot.BeanInstanceSupplier.lambda$get$2(BeanInstanceSupplier.java:208) ~[na:na]
	at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:59) ~[api:6.0.3]
	at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:47) ~[api:6.0.3]
	at org.springframework.beans.factory.aot.BeanInstanceSupplier.invokeBeanSupplier(BeanInstanceSupplier.java:220) ~[na:na]
	at org.springframework.beans.factory.aot.BeanInstanceSupplier.get(BeanInstanceSupplier.java:208) ~[na:na]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainInstanceFromSupplier(AbstractAutowireCapableBeanFactory.java:1225) ~[api:6.0.3]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1210) ~[api:6.0.3]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1157) ~[api:6.0.3]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:561) ~[api:6.0.3]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) ~[api:6.0.3]
	... 71 common frames omitted
Caused by: java.lang.NoSuchMethodException: com.zaxxer.hikari.HikariDataSource.<init>()
	at java.base@17.0.5/java.lang.Class.getConstructor0(DynamicHub.java:3585) ~[api:na]
	at java.base@17.0.5/java.lang.Class.getDeclaredConstructor(DynamicHub.java:2754) ~[api:na]
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141) ~[na:na]
	... 94 common frames omitted