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
A dev is unable to mark non-abstract methods as @Transactional or @ReadOnly in applications with multiple datasources. If they do, they will get a NoUniqueBeanDefinitionException and the application will not boot.
This appears to be related to this change: 871d062
Task List
Steps to reproduce provided
Stacktrace (if present) provided
Example that reproduces the problem uploaded to Github
Full description of the issue provided (see below)
Steps to Reproduce
Create app with two or more dataSources
Create abstract Data Services
Attempt to mark them as transactional
Expected Behaviour
App should boot correctly
Actual Behaviour
Application will fail to start.
When inspecting debug logs, a message similar to this can be seen:
DEBUG o.s.b.f.s.DefaultListableBeanFactory : Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'someDataService': Invocation of init method failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.example.$SomeDataServiceImplementation': Unsatisfied dependency expressed through bean property 'transactionManager'; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'org.springframework.transaction.PlatformTransactionManager' available: expected single matching bean but found 3: transactionManager_secondary,$primaryTransactionManager,transactionManager
Environment Information
Operating System: Ubuntu 20.04
GORM Version: 7.1.0.M3
Grails Version (if using Grails): 4.1.0.BUILD-SNAPSHOT
A dev is unable to mark non-abstract methods as
@Transactional
or@ReadOnly
in applications with multiple datasources. If they do, they will get aNoUniqueBeanDefinitionException
and the application will not boot.This appears to be related to this change: 871d062
Task List
Steps to Reproduce
Expected Behaviour
App should boot correctly
Actual Behaviour
Application will fail to start.
When inspecting debug logs, a message similar to this can be seen:
Environment Information
Example Application
https://github.com/jjelliott/grails-410-multiple-ds-service-error
The text was updated successfully, but these errors were encountered: