-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicated transaction manager #831
Comments
In your stack trace there are more than one
|
I understood that's the issue, what I find weird is why Spring Cloud Task creates a new There's also the case where, if one creates a |
In this case it was to allow task to utilize its own transaction manager seperate from those that may be provided by the user. |
Shouldn't the transaction manager be provided by the My points here are that:
Another alternative would be to add |
Thank you @kewne for your issue and the thought that went into it.
|
I'm also facing the same issue and as a workaround to unblock, I've mentioned which transaction manager I want to use but there are too many files in my project which are using this annotation. I've noticed that the solution for this issue is merged as part of this PR. |
This issue was resolved with the following PR #858 |
I'm using I have to inject a |
Any solution to this? |
@Manu10744 AFAICT #858 was apparently never merged and, looking at the current code, it doesn't look like it was cherry-picked at all, so the issue still exists. |
@kewne I think it is because take a look at https://github.com/fmbenhassine/spring-cloud-task/blob/e4581420b04e872f8aac4cb3ad8bab62bbe9c941/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/configuration/SimpleTaskAutoConfiguration.java The TransactionManager Bean is annotated with So, i am 100% sure I have this property in my @cppwfs Could you please explain? |
I have the same issue using spring boot 2.7.16 and spring-cloud-task 2.4.6 |
Closed via #934 |
In 00b8aca#diff-1ebccb318e2d6a373043c744ca37eb7e8048d8130765f8904184795a593d5a89L92,
@ConditionalOnMissingBean
was removed from thespringCloudTaskTransactionManager
bean, which means that it will conflict with any other AutoConfiguration that creates aPlatformTransactionManager
bean (such as JPA/Hibernate).This repository contains a project that reproduces the error: https://github.com/kewne/spring-cloud-issue-repro;
trying to launch
com.example.demo.DemoApplication
fails withThe text was updated successfully, but these errors were encountered: