You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using spring-data-jpa 3.3.0 with multiple data sources and entity managers and therefore I have multiple @EnableJpaRepositories annotations. I now wanted to change the bootstrap mode to DEFERRED but I get
java.lang.IllegalStateException: Could not register object [org.springframework.data.repository.config.DeferredRepositoryInitializationListener@7aae1170] under bean name 'org.springframework.data.repository.config.DeferredRepositoryInitializationListener': there is already object [org.springframework.data.repository.config.DeferredRepositoryInitializationListener@4ef5dd23] bound
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.registerSingleton(DefaultSingletonBeanRegistry.java:124)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.registerSingleton(DefaultListableBeanFactory.java:1188)
at org.springframework.data.repository.config.RepositoryConfigurationDelegate.potentiallyLazifyRepositories(RepositoryConfigurationDelegate.java:276)
at org.springframework.data.repository.config.RepositoryConfigurationDelegate.registerRepositoriesIn(RepositoryConfigurationDelegate.java:204)
at org.springframework.data.repository.config.RepositoryBeanDefinitionRegistrarSupport.registerBeanDefinitions(RepositoryBeanDefinitionRegistrarSupport.java:94)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.lambda$loadBeanDefinitionsFromRegistrars$1(ConfigurationClassBeanDefinitionReader.java:376)
at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:721)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromRegistrars(ConfigurationClassBeanDefinitionReader.java:375)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:148)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:120)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:429)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:290)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:349)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:118)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:788)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:606)
as each time the @EnableJpaRepositories annotation is processed RepositoryConfigurationDelegate tries to register a DeferredRepositoryInitializationListener bean.
Only register DeferredRepositoryInitializationListener once.
The text was updated successfully, but these errors were encountered:
I'm using spring-data-jpa 3.3.0 with multiple data sources and entity managers and therefore I have multiple @EnableJpaRepositories annotations. I now wanted to change the bootstrap mode to DEFERRED but I get
as each time the @EnableJpaRepositories annotation is processed RepositoryConfigurationDelegate tries to register a DeferredRepositoryInitializationListener bean.
Only register DeferredRepositoryInitializationListener once.
The text was updated successfully, but these errors were encountered: