-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Getting no transaction is in progress when running GlobalTransaction #4976
Comments
no transaction is in progress
when running GlobalTransaction
The current information doesn't seem to have anything to do with seata, so can you provide a demo |
Yes, i used this sample: https://github.com/vir56k/java_demo/tree/master/seata_demo Thanks for your help. |
Hiberate事务冲突了,设置allow_update_outside_transaction=true, |
@finger-dy Thank you for the reply. So first, let me tell you how i solved this. Also, with druid i get this log: But without druid i get this: So for some reason, without druid i am not able to make the connection with a specific database, but with druid it works fine. As for version 1.5.2 or 1.6.0-RC1 they both do not work. I'll do a request, but if this is not possible no problem, as 1.4.2 is working but we want to make this as a future proof solution for us. |
I'll check. |
Hello.
PS: Please, Seata needs a lot a rewriten documentation for the ground up, and specific for each version, as it took me weeks to figure it out how to make it working. That can be my flaw, but still, the documentation is nowhere near a good one, and one that you do not need to ask any question after it. So please, invest on it, and also invest in English one, even though i used google translate, but still there are a lot of people around the world who need Distributed transactions solution, and to which Seata would be a great approach, just like it was for us. |
@a364176773 I somehow mixed the dependencies, and i think i was working with the 1.4.2, because 1.5.2 is the same issue, even with the above bean. Also excluding SeataDataSourceAutoConfiguration gives no impact. |
Ⅰ. Issue Description
We have a couple of microservices build with Spring Boot, postgresql and we use thrift for inner communication.
When i run a global transaction through microservices, i get:
no transaction is in progress; nested exception is javax.persistence.TransactionRequiredException
Ⅱ. Describe what happened
The error happens when we use jpa's saveAndFlush(), but when we use save(), it works fine no error, but it doesn't save at all.
The globaltransaction is created fine in SEATA client (no local transactions though in the case of save() method).
If there is an exception, please attach the exception trace:
When we use save() this is the logs it generates, also it says commited but it is not commited.
With save():
With saveAndFlush():
Ⅲ. Describe what you expected to happen
I really need a fix for this, as we still are considering going with Seata or with something else, but besides this, everything is looking great with Seata, so a help will be appreciated.
Ⅳ. How to reproduce it (as minimally and precisely as possible)
Ⅴ. Anything else we need to know?
Ⅵ. Environment:
The text was updated successfully, but these errors were encountered: